com.horstmann.violet
Class ClassDiagramGraph
java.lang.Object
com.horstmann.violet.framework.Graph
com.horstmann.violet.ClassDiagramGraph
- All Implemented Interfaces:
- java.io.Serializable
public class ClassDiagramGraph
- extends Graph
A UML class diagram.
- See Also:
- Serialized Form
Method Summary |
boolean |
connect(Edge e,
java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
Adds an edge to the graph that joins the nodes containing
the given points. |
Edge[] |
getEdgePrototypes()
Gets the edge types of a particular graph type. |
Node[] |
getNodePrototypes()
Gets the node types of a particular graph type. |
Methods inherited from class com.horstmann.violet.framework.Graph |
add, addNode, connect, draw, findEdge, findNode, getBounds, getEdges, getMinBounds, getNodes, layout, removeEdge, removeNode, setMinBounds, setPersistenceDelegate |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassDiagramGraph
public ClassDiagramGraph()
connect
public boolean connect(Edge e,
java.awt.geom.Point2D p1,
java.awt.geom.Point2D p2)
- Description copied from class:
Graph
- Adds an edge to the graph that joins the nodes containing
the given points. If the points aren't both inside nodes,
then no edge is added.
- Overrides:
connect
in class Graph
- Parameters:
e
- the edge to addp1
- a point in the starting nodep2
- a point in the ending node
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