org.tigris.gef.graph
Interface GraphController

All Superinterfaces:
java.io.Serializable

public interface GraphController
extends java.io.Serializable

This interface is the basis for each class that handles the control of pairs of data and representational objects.


Method Summary
 boolean addPresentation(java.lang.Object representation, java.lang.Object referrer)
          Add a new presentation to the list of known presentations.
 boolean containsEdge(java.lang.Object edge)
          Tests, if the given object is an edge known by the controller.
 boolean containsNode(java.lang.Object node)
          Tests, if the given object is a node known by the controller.
 int countPresentationsFor(java.lang.Object referrer)
          Counts the number of presentations known to the GraphController for the given referrer.
 java.util.Vector getEdges()
          deprecated 0.11 will be removed in 0.12 use getEdges(Collection)
 java.util.Collection getEdges(java.util.Collection c)
           
 java.util.Vector getNodes()
          deprecated 0.11 will be removed in 0.12 use getNodes(Collection)
 java.util.Collection getNodes(java.util.Collection c)
           
 java.lang.Object presentationFor(java.lang.Object data)
          Get the graphical representation of the given object.
 java.lang.Object referrerFor(java.lang.Object presentation)
          Get the related data object for the given object.
 boolean removePresentation(java.lang.Object element)
          Remove a presentation from the list of known presentations.
 

Method Detail

addPresentation

public boolean addPresentation(java.lang.Object representation,
                               java.lang.Object referrer)
Add a new presentation to the list of known presentations. Each presentation consists of a data object (referrer) and an object for its graphical representation.


removePresentation

public boolean removePresentation(java.lang.Object element)
Remove a presentation from the list of known presentations.


presentationFor

public java.lang.Object presentationFor(java.lang.Object data)
Get the graphical representation of the given object.


referrerFor

public java.lang.Object referrerFor(java.lang.Object presentation)
Get the related data object for the given object.


containsNode

public boolean containsNode(java.lang.Object node)
Tests, if the given object is a node known by the controller.


containsEdge

public boolean containsEdge(java.lang.Object edge)
Tests, if the given object is an edge known by the controller.


getNodes

public java.util.Vector getNodes()
deprecated 0.11 will be removed in 0.12 use getNodes(Collection)


getEdges

public java.util.Vector getEdges()
deprecated 0.11 will be removed in 0.12 use getEdges(Collection)


getNodes

public java.util.Collection getNodes(java.util.Collection c)

getEdges

public java.util.Collection getEdges(java.util.Collection c)

countPresentationsFor

public int countPresentationsFor(java.lang.Object referrer)
Counts the number of presentations known to the GraphController for the given referrer.