|
||||||||||
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.FieldNode
public class FieldNode
A field node in an object diagram.
Field Summary | |
---|---|
static int |
DEFAULT_HEIGHT
|
static int |
DEFAULT_WIDTH
|
Fields inherited from class com.horstmann.violet.framework.AbstractNode |
---|
SHADOW_GAP |
Constructor Summary | |
---|---|
FieldNode()
|
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()
|
void |
draw(java.awt.Graphics2D g2)
Draw the node. |
double |
getAxisX()
Gets the x-offset of the axis (the location of the = sign) from the left corner of the bounding rectangle. |
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()
|
MultiLineString |
getValue()
Gets the value property value. |
boolean |
isBoxedValue()
Gets the boxedValue property value. |
void |
layout(Graph g,
java.awt.Graphics2D g2,
Grid grid)
Lays out the node and its children. |
void |
setBoxedValue(boolean newValue)
Sets the boxedValue property value. |
void |
setBoxWidth(double newValue)
Sets the box width. |
void |
setName(MultiLineString newValue)
Sets the name property value. |
void |
setValue(MultiLineString newValue)
Sets the value property value. |
Methods inherited from class com.horstmann.violet.framework.RectangularNode |
---|
contains, 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 |
Field Detail |
---|
public static int DEFAULT_WIDTH
public static int DEFAULT_HEIGHT
Constructor Detail |
---|
public FieldNode()
Method Detail |
---|
public void draw(java.awt.Graphics2D g2)
Node
draw
in interface Node
draw
in class AbstractNode
g2
- the graphics contextpublic 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 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
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 newValue)
newValue
- the field namepublic MultiLineString getName()
public void setValue(MultiLineString newValue)
newValue
- the field valuepublic MultiLineString getValue()
public void setBoxWidth(double newValue)
newValue
- the new box widthpublic void setBoxedValue(boolean newValue)
newValue
- the new property valuepublic boolean isBoxedValue()
public java.lang.Object clone()
clone
in interface Node
clone
in class RectangularNode
public double getAxisX()
public java.awt.Shape getShape()
getShape
in class RectangularNode
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |