|
||||||||||
| 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
public abstract class RectangularNode
A node that has a rectangular shape.
| Field Summary |
|---|
| Fields inherited from class com.horstmann.violet.framework.AbstractNode |
|---|
SHADOW_GAP |
| Constructor Summary | |
|---|---|
RectangularNode()
|
|
| Method Summary | |
|---|---|
java.lang.Object |
clone()
|
boolean |
contains(java.awt.geom.Point2D p)
Tests whether the node contains a point. |
java.awt.geom.Rectangle2D |
getBounds()
Get the bounding rectangle of the shape of this node |
java.awt.geom.Point2D |
getConnectionPoint(Direction d)
Get the best connection point to connect this node with another node. |
java.awt.Shape |
getShape()
|
void |
layout(Graph g,
java.awt.Graphics2D g2,
Grid grid)
Lays out the node and its children. |
void |
setBounds(java.awt.geom.Rectangle2D newBounds)
|
void |
translate(double dx,
double dy)
Translates the node by a given amount |
| Methods inherited from class com.horstmann.violet.framework.AbstractNode |
|---|
addChild, addChild, addEdge, addNode, draw, 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 RectangularNode()
| Method Detail |
|---|
public java.lang.Object clone()
clone in interface Nodeclone in class AbstractNode
public void translate(double dx,
double dy)
Node
translate in interface Nodetranslate in class AbstractNodedx - the amount to translate in the x-directiondy - the amount to translate in the y-directionpublic boolean contains(java.awt.geom.Point2D p)
Node
p - the point to test
public java.awt.geom.Rectangle2D getBounds()
Node
public void setBounds(java.awt.geom.Rectangle2D newBounds)
public void layout(Graph g,
java.awt.Graphics2D g2,
Grid grid)
Node
layout in interface Nodelayout in class AbstractNodeg - the ambient graphg2 - the graphics contextgrid - the grid to snap topublic java.awt.geom.Point2D getConnectionPoint(Direction d)
Node
d - the direction from the center
of the bounding rectangle towards the boundary
public java.awt.Shape getShape()
getShape in class AbstractNode
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||