|
||||||||||
| 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.ObjectNode
public class ObjectNode
An object node in an object diagram.
| Field Summary |
|---|
| Fields inherited from class com.horstmann.violet.framework.AbstractNode |
|---|
SHADOW_GAP |
| Constructor Summary | |
|---|---|
ObjectNode()
Construct an object node with a default size |
|
| Method Summary | |
|---|---|
void |
addChild(Node n)
This is a patch to ensure that object diagrams can be read back in correctly. |
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()
|
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.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 |
|---|
contains, getBounds, getShape, setBounds, translate |
| Methods inherited from class com.horstmann.violet.framework.AbstractNode |
|---|
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 ObjectNode()
| Method Detail |
|---|
public void draw(java.awt.Graphics2D g2)
Node
draw in interface Nodedraw in class AbstractNodeg2 - the graphics contextpublic java.awt.geom.Rectangle2D getTopRectangle()
public boolean addEdge(Edge e,
java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Node
addEdge in interface NodeaddEdge in class AbstractNodee - the edge to add
public java.awt.geom.Point2D getConnectionPoint(Direction d)
Node
getConnectionPoint in interface NodegetConnectionPoint in class RectangularNoded - 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 Nodelayout in class RectangularNodeg - the ambient graphg2 - the graphics contextgrid - the grid to snap topublic void setName(MultiLineString n)
newValue - the new object namepublic MultiLineString getName()
the - object namepublic java.lang.Object clone()
clone in interface Nodeclone in class RectangularNode
public boolean addNode(Node n,
java.awt.geom.Point2D p)
Node
addNode in interface NodeaddNode in class AbstractNoden - the child nodep - the point at which the node is being added
public void addChild(Node n)
addChild in class AbstractNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||