|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.horstmann.violet.framework.AbstractNode
com.horstmann.violet.framework.RectangularNode
com.horstmann.violet.ImplicitParameterNode
public class ImplicitParameterNode
An object node in a scenario diagram.
Field Summary |
---|
Fields inherited from class com.horstmann.violet.framework.AbstractNode |
---|
SHADOW_GAP |
Constructor Summary | |
---|---|
ImplicitParameterNode()
Construct an object node with a default size |
Method Summary | |
---|---|
boolean |
addEdge(Edge e,
java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Adds an edge that originates at this node. |
boolean |
addNode(Node n,
java.awt.geom.Point2D p)
Adds a node as a child node to this node. |
java.lang.Object |
clone()
|
boolean |
contains(java.awt.geom.Point2D p)
Tests whether the node contains a point. |
void |
draw(java.awt.Graphics2D g2)
Draw the node. |
java.awt.geom.Point2D |
getConnectionPoint(Direction d)
Get the best connection point to connect this node with another node. |
MultiLineString |
getName()
Gets the name property value. |
java.awt.Shape |
getShape()
|
java.awt.geom.Rectangle2D |
getTopRectangle()
Returns the rectangle at the top of the object node. |
void |
layout(Graph g,
java.awt.Graphics2D g2,
Grid grid)
Lays out the node and its children. |
void |
setName(MultiLineString n)
Sets the name property value. |
Methods inherited from class com.horstmann.violet.framework.RectangularNode |
---|
getBounds, setBounds, translate |
Methods inherited from class com.horstmann.violet.framework.AbstractNode |
---|
addChild, addChild, getChildren, getParent, removeChild, removeEdge, removeNode, setParent, setPersistenceDelegate |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImplicitParameterNode()
Method Detail |
---|
public boolean contains(java.awt.geom.Point2D p)
Node
contains
in interface Node
contains
in class RectangularNode
p
- the point to test
public void draw(java.awt.Graphics2D g2)
Node
draw
in interface Node
draw
in class AbstractNode
g2
- the graphics contextpublic java.awt.geom.Rectangle2D getTopRectangle()
public java.awt.Shape getShape()
getShape
in class RectangularNode
public boolean addEdge(Edge e, java.awt.geom.Point2D p1, java.awt.geom.Point2D p2)
Node
addEdge
in interface Node
addEdge
in class AbstractNode
e
- the edge to add
public java.awt.geom.Point2D getConnectionPoint(Direction d)
Node
getConnectionPoint
in interface Node
getConnectionPoint
in class RectangularNode
d
- the direction from the center
of the bounding rectangle towards the boundary
public void layout(Graph g, java.awt.Graphics2D g2, Grid grid)
Node
layout
in interface Node
layout
in class RectangularNode
g
- the ambient graphg2
- the graphics contextgrid
- the grid to snap topublic void setName(MultiLineString n)
newValue
- the name of this objectpublic MultiLineString getName()
public java.lang.Object clone()
clone
in interface Node
clone
in class RectangularNode
public boolean addNode(Node n, java.awt.geom.Point2D p)
Node
addNode
in interface Node
addNode
in class AbstractNode
n
- the child nodep
- the point at which the node is being added
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |