org.wilmascope.control
Class GraphControl

java.lang.Object
  extended by java.util.Observable
      extended by org.wilmascope.control.GraphControl

public class GraphControl
extends java.util.Observable

GraphControl gives the access point or facade for the WilmaGraph drawing engine.


Nested Class Summary
 class GraphControl.Cluster
          the interface for clusters which are collections of nodes, note that a cluster is also a node so you can add a cluster as a member to a cluster using the GraphControl.Cluster.addNode(GraphControl.Node)method
 class GraphControl.Edge
          The interface for edges
 class GraphControl.ForceFacade
           
 class GraphControl.GraphElementFacade
          the basic interface common to all GraphElements
 class GraphControl.Node
          the interface for nodes
 
Field Summary
static java.lang.Class clusterClass
          an instance of a GraphControl.Clusterclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)
static java.lang.Class edgeClass
          an instance of a GraphControl.Edgeclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)
static java.lang.Class graphElementClass
          an instance of a GraphControl.GraphElementFacadeclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)
static java.lang.Class nodeClass
          an instance of a GraphControl.Nodeclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)
 
Constructor Summary
GraphControl(int xsize, int ysize)
           
 
Method Summary
 void addObserver(LayoutObserver o)
           
 void centreGraph()
           
 void freeze()
          Net effect is to freeze the layout animation
 GraphCanvas getGraphCanvas()
           
 int getIterationsPerFrame()
           
static PickListener getPickListener()
           
 GraphControl.Cluster getRootCluster()
          get a reference to the root cluster of the graph
protected  void iterate()
           
protected  void notifyLayoutObservers()
           
 void reset()
           
 void setIterationsPerFrame(int iterations)
           
 void setLayoutObserver(java.util.Observer o)
           
 void setRootCluster(GraphControl.Cluster rootCluster)
           
 void setRootPickingClient(PickingClient client)
           
 void unfreeze()
          Net effect is to unfreeze the layout animation
 
Methods inherited from class java.util.Observable
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

graphElementClass

public static java.lang.Class graphElementClass
an instance of a GraphControl.GraphElementFacadeclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)


nodeClass

public static java.lang.Class nodeClass
an instance of a GraphControl.Nodeclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)


edgeClass

public static java.lang.Class edgeClass
an instance of a GraphControl.Edgeclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)


clusterClass

public static java.lang.Class clusterClass
an instance of a GraphControl.Clusterclass that can be passed into PickListener.enableMultiPicking(int, java.lang.Class[])and PickListener.setSinglePickClient(org.wilmascope.control.PickClient, java.lang.Class)

Constructor Detail

GraphControl

public GraphControl(int xsize,
                    int ysize)
Method Detail

getRootCluster

public GraphControl.Cluster getRootCluster()
get a reference to the root cluster of the graph


setRootCluster

public void setRootCluster(GraphControl.Cluster rootCluster)

setRootPickingClient

public void setRootPickingClient(PickingClient client)

iterate

protected void iterate()

centreGraph

public void centreGraph()

getGraphCanvas

public GraphCanvas getGraphCanvas()

setIterationsPerFrame

public void setIterationsPerFrame(int iterations)

setLayoutObserver

public void setLayoutObserver(java.util.Observer o)

getIterationsPerFrame

public int getIterationsPerFrame()

freeze

public void freeze()
Net effect is to freeze the layout animation


unfreeze

public void unfreeze()
Net effect is to unfreeze the layout animation


reset

public void reset()

getPickListener

public static PickListener getPickListener()

addObserver

public void addObserver(LayoutObserver o)

notifyLayoutObservers

protected void notifyLayoutObservers()