Search this API

y.layout.hierarchic.incremental
Interface EdgeReverser


public interface EdgeReverser

Interface for implementations that perform their work after the first phase.

See Also:
HierarchicLayouter

Method Summary
 void normalizeEdges(LayoutGraph graph, LayoutDataProvider ldp)
          Called at the beginning of the layout algorithm.
 void restoreEdgeDirections(LayoutGraph graph, LayoutDataProvider ldp)
          Called at the end of the layout algorithm.
 void reverse(LayoutGraph graph, LayoutDataProvider ldp, Edge edge)
          May be called by the incremental parts of the layout algorithm.
 

Method Detail

normalizeEdges

void normalizeEdges(LayoutGraph graph,
                    LayoutDataProvider ldp)
Called at the beginning of the layout algorithm. This method should reverse all edges which point into the wrong direction. I.e. if the layer index of the source node is greater than the layer index of the target node.

Parameters:
graph - the graph that contains the elements
ldp - the LayoutDataProvider that can be queried to receive the layering information
See Also:
LayoutDataProvider.getNodeData(y.base.Node), NodeData.getLayer()

reverse

void reverse(LayoutGraph graph,
             LayoutDataProvider ldp,
             Edge edge)
May be called by the incremental parts of the layout algorithm. This method should reverse the given edge which points into the wrong direction.

Parameters:
graph - the graph that contains the elements
ldp - the LayoutDataProvider that can be queried to receive the layering information
edge - the edge to reverse
See Also:
LayoutDataProvider.getNodeData(y.base.Node), NodeData.getLayer()

restoreEdgeDirections

void restoreEdgeDirections(LayoutGraph graph,
                           LayoutDataProvider ldp)
Called at the end of the layout algorithm. This method should reverse all edges which have been marked as reversed.

Parameters:
graph - the graph that contains the elements
ldp - the LayoutDataProvider that can be queried to receive the layering information

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