All Packages Class Hierarchy This Package Previous Next Index
Class Graph.EdgeFactory
java.lang.Object
|
+----Graph.EdgeFactory
- public class EdgeFactory
- extends Object
- implements Serializable
Edge Factory class is used for creating new edges.
- See Also:
- GraphDisplay, Edge
-
EdgeFactory()
-
-
addEdge(Node, Node)
-
addEdge performes some checking before it creates
new edge - it checks whether node with same
start and end node, already exists in the hashtable
of the edges.
-
newEdge(String, Node, Node)
-
Creates new instance of given edge class
-
setEdgeType(String)
-
Sets edge type
-
setGraphDisplay(GraphDisplay)
-
EdgeFactory
public EdgeFactory()
addEdge
public boolean addEdge(Node n1,
Node n2)
- addEdge performes some checking before it creates
new edge - it checks whether node with same
start and end node, already exists in the hashtable
of the edges.
newEdge
public Edge newEdge(String type,
Node start,
Node end)
- Creates new instance of given edge class
setEdgeType
public void setEdgeType(String type)
- Sets edge type
setGraphDisplay
public void setGraphDisplay(GraphDisplay graphDisplay)
All Packages Class Hierarchy This Package Previous Next Index