utilities
Class GraphEdge

java.lang.Object
  |
  +--utilities.GraphNode
        |
        +--utilities.GraphEdge
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, ConfiguredObject, java.io.Serializable

public class GraphEdge
extends GraphNode
implements java.io.Serializable, java.lang.Cloneable

GraphEdge

This is a superclass for the generic purpose of drawing edges in a graph. It works with GraphNode. This is a generalization of the taems Interrelationship.

See Also:
Serialized Form

Constructor Summary
GraphEdge()
          blank constructor
GraphEdge(GraphNode nodeFrom, GraphNode nodeTo)
          labelless constructor
GraphEdge(java.lang.String l)
          constructor that sets only the label
GraphEdge(java.lang.String l, GraphNode nodeFrom, GraphNode nodeTo)
          Default constructor
 
Method Summary
 java.lang.Object clone()
          Clone
 void excise()
          Detaches the node from the structure its in.
 javax.swing.JPanel getDefaultPanel()
          Drawing stuff *
 boolean getDrawArrows()
           
 GraphNode getFrom()
          attachers
 GraphNode getTo()
           
 boolean matches(java.lang.Object o)
          Determines if an object matches this one.
 void setDrawArrows(boolean b)
           
 void setFrom(GraphNode n)
           
 void setTo(GraphNode n)
           
 
Methods inherited from class utilities.GraphNode
addEdge, addEdge, compareTo, equals, getAttribute, getAttributes, getInEdges, getLabel, getOutEdges, getUndirEdges, hasAttribute, hasInEdges, hasOutEdges, hasUndirEdges, numInEdges, numOutEdges, numUndirEdges, removeEdge, removeEdge, saveCfg, setAttribute, setLabel, toString, updateCfg
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GraphEdge

public GraphEdge(java.lang.String l,
                 GraphNode nodeFrom,
                 GraphNode nodeTo)
Default constructor
Parameters:
l - The edge's label
nodeFrom - The node the edge originates from (may be null)
nodeTo - The node the edge leads to (may be null)

GraphEdge

public GraphEdge(GraphNode nodeFrom,
                 GraphNode nodeTo)
labelless constructor
Parameters:
nodeFrom - The node the edge originates from (may be null)
nodeTo - The node the edge leads to (may be null)

GraphEdge

public GraphEdge(java.lang.String l)
constructor that sets only the label
Parameters:
l - the label

GraphEdge

public GraphEdge()
blank constructor
Method Detail

getFrom

public GraphNode getFrom()
attachers

getTo

public GraphNode getTo()

setFrom

public void setFrom(GraphNode n)

setDrawArrows

public void setDrawArrows(boolean b)

getDrawArrows

public boolean getDrawArrows()

setTo

public void setTo(GraphNode n)

excise

public void excise()
Detaches the node from the structure its in.
Overrides:
excise in class GraphNode

matches

public boolean matches(java.lang.Object o)
Determines if an object matches this one.
Overrides:
matches in class GraphNode
See Also:
GraphNode.matches(java.lang.Object)

clone

public java.lang.Object clone()
Clone
Overrides:
clone in class GraphNode

getDefaultPanel

public javax.swing.JPanel getDefaultPanel()
Drawing stuff *
Overrides:
getDefaultPanel in class GraphNode