y.layout.hierarchic
Class EdgeReverser

java.lang.Object
  |
  +--y.layout.hierarchic.EdgeReverser

public class EdgeReverser
extends Object

Helper that reverses edges that are oriented in the wrong direction.


Constructor Summary
EdgeReverser()
           
 
Method Summary
 void reverseEdges(Graph g, EdgeList edgeList)
          Reverses the edges contained ion the given edge list
static EdgeList reverseUpwardEdges(Graph g, NodeMap layerMap)
          Reverses edges in the given graph whose source node has a larger layer ID than the target node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EdgeReverser

public EdgeReverser()
Method Detail

reverseUpwardEdges

public static EdgeList reverseUpwardEdges(Graph g,
                                          NodeMap layerMap)
Reverses edges in the given graph whose source node has a larger layer ID than the target node.

Parameters:
g - target graph
layerMap - node map that contains a layer ID for each node
Returns:
a list of edges that have been reversed

reverseEdges

public void reverseEdges(Graph g,
                         EdgeList edgeList)
Reverses the edges contained ion the given edge list

Parameters:
g - the graph containing the edges in edgeList
edgeList - contains to be reversed edges.

© Copyright 2000-2003,
yWorks GmbH.
All rights reserved.

2003