com.horstmann.violet
Class CircularStateNode

java.lang.Object
  extended by com.horstmann.violet.framework.AbstractNode
      extended by com.horstmann.violet.framework.RectangularNode
          extended by com.horstmann.violet.CircularStateNode
All Implemented Interfaces:
Node, java.io.Serializable, java.lang.Cloneable

public class CircularStateNode
extends RectangularNode

An initial or final node (bull's eye) in a state or activity diagram.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.horstmann.violet.framework.AbstractNode
SHADOW_GAP
 
Constructor Summary
CircularStateNode()
          Construct a node with a default size
 
Method Summary
 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.
 java.awt.Shape getShape()
           
 boolean isFinal()
           
 void setFinal(boolean newValue)
           
 
Methods inherited from class com.horstmann.violet.framework.RectangularNode
clone, contains, getBounds, layout, setBounds, translate
 
Methods inherited from class com.horstmann.violet.framework.AbstractNode
addChild, addChild, addEdge, addNode, 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

CircularStateNode

public CircularStateNode()
Construct a node with a default size

Method Detail

isFinal

public boolean isFinal()

setFinal

public void setFinal(boolean newValue)

getConnectionPoint

public java.awt.geom.Point2D getConnectionPoint(Direction d)
Description copied from interface: Node
Get the best connection point to connect this node with another node. This should be a point on the boundary of the shape of this node.

Specified by:
getConnectionPoint in interface Node
Overrides:
getConnectionPoint in class RectangularNode
Parameters:
d - the direction from the center of the bounding rectangle towards the boundary
Returns:
the recommended connection point

draw

public void draw(java.awt.Graphics2D g2)
Description copied from interface: Node
Draw the node.

Specified by:
draw in interface Node
Overrides:
draw in class AbstractNode
Parameters:
g2 - the graphics context

getShape

public java.awt.Shape getShape()
Overrides:
getShape in class RectangularNode
Returns:
the shape to be used for computing the drop shadow