|
||||||||||
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.PackageNode
public class PackageNode
A package node in a UML diagram.
Field Summary |
---|
Fields inherited from class com.horstmann.violet.framework.AbstractNode |
---|
SHADOW_GAP |
Constructor Summary | |
---|---|
PackageNode()
Construct a package node with a default size |
Method Summary | |
---|---|
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. |
MultiLineString |
getContents()
Gets the contents property value. |
java.lang.String |
getName()
Gets the name property value. |
java.awt.Shape |
getShape()
|
void |
layout(Graph g,
java.awt.Graphics2D g2,
Grid grid)
Lays out the node and its children. |
void |
setContents(MultiLineString newValue)
Sets the contents property value. |
void |
setName(java.lang.String newValue)
Sets the name property value. |
Methods inherited from class com.horstmann.violet.framework.RectangularNode |
---|
contains, getBounds, getConnectionPoint, setBounds, translate |
Methods inherited from class com.horstmann.violet.framework.AbstractNode |
---|
addChild, addChild, addEdge, 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 PackageNode()
Method Detail |
---|
public void draw(java.awt.Graphics2D g2)
Node
draw
in interface Node
draw
in class AbstractNode
g2
- the graphics contextpublic java.awt.Shape getShape()
getShape
in class RectangularNode
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(java.lang.String newValue)
newValue
- the class namepublic java.lang.String getName()
public void setContents(MultiLineString newValue)
newValue
- the contents of this classpublic MultiLineString getContents()
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 |