Search this API

y.layout.hierarchic
Class EdgeReverser

java.lang.Object
  extended by y.layout.hierarchic.EdgeReverser

public class EdgeReverser
extends java.lang.Object

This is a helper class that reverses edges that are oriented in the wrong direction.

 

Method Summary
static void reverseEdges(Graph graph, EdgeList edgeList)
          Reverses the edges contained in the given list of edges.
static EdgeList reverseUpwardEdges(Graph graph, NodeMap layerID)
          Reverses edges of 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
 

Method Detail

reverseUpwardEdges

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

Parameters:
graph - the graph
layerID - the NodeMap that returns the zero-based index of the layer to which each node belongs
Returns:
an EdgeList containing the edges that have been reversed

reverseEdges

public static void reverseEdges(Graph graph,
                                EdgeList edgeList)
Reverses the edges contained in the given list of edges.

Parameters:
graph - the graph
edgeList - the EdgeList containing the edges that must be reversed

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