com.horstmann.violet
Class SequenceDiagramGraph

java.lang.Object
  extended by com.horstmann.violet.framework.Graph
      extended by com.horstmann.violet.SequenceDiagramGraph
All Implemented Interfaces:
java.io.Serializable

public class SequenceDiagramGraph
extends Graph

A UML sequence diagram.

See Also:
Serialized Form

Constructor Summary
SequenceDiagramGraph()
           
 
Method Summary
 boolean add(Node n, java.awt.geom.Point2D p)
          Adds a node to the graph so that the top left corner of the bounding rectangle is at the given point.
 void draw(java.awt.Graphics2D g2, Grid g)
          Draws the graph
 Edge[] getEdgePrototypes()
          Gets the edge types of a particular graph type.
 Node[] getNodePrototypes()
          Gets the node types of a particular graph type.
 void layout(java.awt.Graphics2D g2, Grid grid)
          Computes the layout of the graph.
 void removeEdge(Edge e)
          Removes an edge from the graph.
 
Methods inherited from class com.horstmann.violet.framework.Graph
addNode, connect, connect, findEdge, findNode, getBounds, getEdges, getMinBounds, getNodes, layout, removeNode, setMinBounds, setPersistenceDelegate
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SequenceDiagramGraph

public SequenceDiagramGraph()
Method Detail

add

public boolean add(Node n,
                   java.awt.geom.Point2D p)
Description copied from class: Graph
Adds a node to the graph so that the top left corner of the bounding rectangle is at the given point.

Overrides:
add in class Graph
Parameters:
n - the node to add
p - the desired location

removeEdge

public void removeEdge(Edge e)
Description copied from class: Graph
Removes an edge from the graph.

Overrides:
removeEdge in class Graph
Parameters:
e - the edge to remove

layout

public void layout(java.awt.Graphics2D g2,
                   Grid grid)
Description copied from class: Graph
Computes the layout of the graph. If you override this method, you must first call super.layout.

Parameters:
g2 - the graphics context
grid - the grid to snap to

draw

public void draw(java.awt.Graphics2D g2,
                 Grid g)
Description copied from class: Graph
Draws the graph

Overrides:
draw in class Graph
Parameters:
g2 - the graphics context

getNodePrototypes

public Node[] getNodePrototypes()
Description copied from class: Graph
Gets the node types of a particular graph type.

Specified by:
getNodePrototypes in class Graph
Returns:
an array of node prototypes

getEdgePrototypes

public Edge[] getEdgePrototypes()
Description copied from class: Graph
Gets the edge types of a particular graph type.

Specified by:
getEdgePrototypes in class Graph
Returns:
an array of edge prototypes