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

java.lang.Object
  extended byorg.globus.cog.gui.grapheditor.canvas.views.layouts.FlowLayout
All Implemented Interfaces:
GraphLayoutEngine, GraphLayoutEngine2, StatusReporter

public class FlowLayout
extends Object
implements GraphLayoutEngine2, StatusReporter


Constructor Summary
FlowLayout()
           
FlowLayout(StatusManager statusManager)
           
 
Method Summary
protected  void dumpGraph(GraphInterface graph)
           
protected  void dumpGraph(GraphInterface graph, Writer fw)
           
 StatusManager getStatusManager()
           
 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.
protected  Node next(Node n)
           
protected  Node prepare(GraphInterface graph, GraphInterface old)
           
protected  Node prev(Node n)
           
protected  void reduce(GraphInterface graph)
           
protected  boolean reduceParallel(GraphInterface graph)
           
protected  boolean reduceParallelForced(GraphInterface graph)
           
protected  boolean reduceSequential(GraphInterface graph)
           
protected  void removeCycles(GraphInterface graph, Node entry)
           
 void setIgnoredEdges(Set ignoredEdges)
           
 void setStatusManager(StatusManager statusManager)
           
protected  boolean split(GraphInterface graph)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FlowLayout

public FlowLayout()

FlowLayout

public FlowLayout(StatusManager statusManager)
Method Detail

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.

prepare

protected Node prepare(GraphInterface graph,
                       GraphInterface old)

removeCycles

protected void removeCycles(GraphInterface graph,
                            Node entry)

split

protected boolean split(GraphInterface graph)

reduce

protected void reduce(GraphInterface graph)

dumpGraph

protected void dumpGraph(GraphInterface graph)

dumpGraph

protected void dumpGraph(GraphInterface graph,
                         Writer fw)
                  throws IOException
Throws:
IOException

reduceSequential

protected boolean reduceSequential(GraphInterface graph)

next

protected Node next(Node n)

prev

protected Node prev(Node n)

reduceParallel

protected boolean reduceParallel(GraphInterface graph)

reduceParallelForced

protected boolean reduceParallelForced(GraphInterface graph)

setIgnoredEdges

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

setStatusManager

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

getStatusManager

public StatusManager getStatusManager()