org.tigris.gef.graph.presentation
Class NetList

java.lang.Object
  extended by org.tigris.gef.graph.presentation.NetPrimitive
      extended by org.tigris.gef.graph.presentation.NetList
All Implemented Interfaces:
java.io.Serializable

public class NetList
extends NetPrimitive
implements java.io.Serializable

A class that implements the concept of a connected graph. A NetList is not any one object in the connected graph, it is the overall graph. A NetList contains a list of nodes and edges. This class is used by DefaulGraphModel, if you implement your own GraphModel, you can use your own application-specific representation of graphs.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.tigris.gef.graph.presentation.NetPrimitive
_changeSup, _highlight
 
Constructor Summary
NetList()
          Construct a new NetList with no contained nodes.
 
Method Summary
 void addEdge(NetEdge a)
          Add a NetEdge to this NetList.
 void addNode(NetNode n)
          Add a node to this NetList.
 java.util.List getEdges()
          Reply the vector of edges
 java.util.Collection getEdges(java.util.Collection c)
          Reply the vector of edges
 java.lang.String getId()
           
 java.lang.String getName()
           
 java.util.List getNodes()
          Reply the vector of nodes
 java.util.Collection getNodes(java.util.Collection c)
          Reply the vector of nodes
 void removeAllEdges()
          Remove all the edges from this NetList.
 void removeAllNodes()
          Remove all the nodes from this NetList.
 void removeEdge(NetEdge a)
          Remove a Edge from this NetList.
 void removeNode(NetNode n)
          Remove a node from this NetList.
 void setName(java.lang.String n)
           
 
Methods inherited from class org.tigris.gef.graph.presentation.NetPrimitive
addPropertyChangeListener, firePropertyChange, firePropertyChange, firePropertyChange, getHighlight, removePropertyChangeListener, setHighlight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NetList

public NetList()
Construct a new NetList with no contained nodes.

Method Detail

getId

public java.lang.String getId()
Specified by:
getId in class NetPrimitive

setName

public void setName(java.lang.String n)

getName

public java.lang.String getName()

getNodes

public java.util.List getNodes()
Reply the vector of nodes


getEdges

public java.util.List getEdges()
Reply the vector of edges


getNodes

public java.util.Collection getNodes(java.util.Collection c)
Reply the vector of nodes


getEdges

public java.util.Collection getEdges(java.util.Collection c)
Reply the vector of edges


addNode

public void addNode(NetNode n)
Add a node to this NetList.


removeNode

public void removeNode(NetNode n)
Remove a node from this NetList. When a node is deleted a notification is sent out.


addEdge

public void addEdge(NetEdge a)
Add a NetEdge to this NetList.


removeEdge

public void removeEdge(NetEdge a)
Remove a Edge from this NetList.


removeAllNodes

public void removeAllNodes()
Remove all the nodes from this NetList.


removeAllEdges

public void removeAllEdges()
Remove all the edges from this NetList.