org.globus.cog.gui.grapheditor.canvas.views.layouts
Class PersistentLayoutEngine2

java.lang.Object
  extended byorg.globus.cog.gui.grapheditor.canvas.views.layouts.PersistentLayoutEngine2
All Implemented Interfaces:
ActionListener, EventListener, GraphLayoutEngine, GraphLayoutEngine2, GraphListener, PropertyChangeListener, StatusReporter

public class PersistentLayoutEngine2
extends Object
implements ActionListener, PropertyChangeListener, GraphLayoutEngine2, GraphListener, StatusReporter


Constructor Summary
PersistentLayoutEngine2()
           
PersistentLayoutEngine2(GraphLayoutEngine layoutEngine)
           
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 GraphLayoutEngine getLayoutEngine()
           
 void graphChanged(GraphChangedEvent e)
           
 Hashtable layoutGraph(GraphInterface graph, Hashtable fixedNodes)
          This method takes a graph and a Hashtable with the nodes that cannot be moved and returns a Hashtable with the coordinates of the nodes after doing the layout.
 Hashtable layoutGraph(GraphInterface graph, Hashtable fixedNodes, boolean ignorePersistence)
           
 void propertyChange(PropertyChangeEvent evt)
           
 void setGraph(GraphInterface graph)
           
 void setIgnoredEdges(Set ignoredEdges)
           
 void setLayoutEngine(GraphLayoutEngine layoutEngine)
           
 void setStatusManager(StatusManager statusManager)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PersistentLayoutEngine2

public PersistentLayoutEngine2()

PersistentLayoutEngine2

public PersistentLayoutEngine2(GraphLayoutEngine layoutEngine)
Method Detail

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

layoutGraph

public Hashtable layoutGraph(GraphInterface graph,
                             Hashtable fixedNodes)
Description copied from interface: GraphLayoutEngine
This method takes a graph and a Hashtable with the nodes that cannot be moved and returns a Hashtable with the coordinates of the nodes after doing the layout.

Specified by:
layoutGraph in interface GraphLayoutEngine
Parameters:
graph - The graph that needs to be layed out
fixedNodes - A Hashtable containing Node objects as keys, and Points as elements, which specify the coordinates of the non-movable nodes
Returns:
a Hashtable with Node objects as keys and Point objects as coordinates for the nodes.

layoutGraph

public Hashtable layoutGraph(GraphInterface graph,
                             Hashtable fixedNodes,
                             boolean ignorePersistence)

propertyChange

public void propertyChange(PropertyChangeEvent evt)
Specified by:
propertyChange in interface PropertyChangeListener

getLayoutEngine

public GraphLayoutEngine getLayoutEngine()

setLayoutEngine

public void setLayoutEngine(GraphLayoutEngine layoutEngine)

graphChanged

public void graphChanged(GraphChangedEvent e)
Specified by:
graphChanged in interface GraphListener

setGraph

public void setGraph(GraphInterface graph)

setStatusManager

public void setStatusManager(StatusManager statusManager)
Specified by:
setStatusManager in interface StatusReporter

setIgnoredEdges

public void setIgnoredEdges(Set ignoredEdges)
Specified by:
setIgnoredEdges in interface GraphLayoutEngine2