Eclipse Draw2d
3.1

org.eclipse.draw2d.internal.graph
Class PopulateRanks

java.lang.Object
  extended byorg.eclipse.draw2d.internal.graph.GraphVisitor
      extended byorg.eclipse.draw2d.internal.graph.PopulateRanks
Direct Known Subclasses:
CompoundPopulateRanks

public class PopulateRanks
extends GraphVisitor

This class takes a DirectedGraph with an optimal rank assignment and a spanning tree, and populates the ranks of the DirectedGraph. Virtual nodes are inserted for edges that span 1 or more ranks.

Ranks are populated using a pre-order depth-first traversal of the spanning tree. For each node, all edges requiring virtual nodes are added to the ranks.

Since:
2.1.2

Constructor Summary
PopulateRanks()
           
 
Method Summary
 void revisit(DirectedGraph g)
          Called in reverse order of visit.
 void visit(DirectedGraph g)
          Act on the given directed graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PopulateRanks

public PopulateRanks()
Method Detail

visit

public void visit(DirectedGraph g)
Description copied from class: GraphVisitor
Act on the given directed graph.

Specified by:
visit in class GraphVisitor
Parameters:
g - the graph
See Also:
GraphVisitor.visit(org.eclipse.draw2d.graph.DirectedGraph)

revisit

public void revisit(DirectedGraph g)
Description copied from class: GraphVisitor
Called in reverse order of visit.

Overrides:
revisit in class GraphVisitor
Parameters:
g - the graph to act upon
See Also:
GraphVisitor.revisit(DirectedGraph)

Eclipse Draw2d
3.1

Copyright (c) IBM Corp. and others 2000, 2005. All Rights Reserved.