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.List getEdges()
           
 java.util.List getNodes()
           
 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

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

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


presentationFor

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


referrerFor

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


containsNode

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


containsEdge

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


getNodes

java.util.List getNodes()

getEdges

java.util.List getEdges()

countPresentationsFor

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