Search this API

y.layout.hierarchic.incremental
Interface NodePlacer

All Known Implementing Classes:
SimplexNodePlacer

public interface NodePlacer

Responsible for the x (sequence) and preliminary y coordinate assignments of a drawing. Implementations of this interface are used during the last phases of the algorithm of the HierarchicLayouter. They determine preliminary y coordinates (which may be adjusted during the final edge routing) and the x coordinates of all the elements that are part of the graph during the node placement phase.

See Also:
SimplexNodePlacer, DrawingDistanceCalculator, HierarchicLayouter, HierarchicLayouter.setNodePlacer(NodePlacer), IncrementalHierarchicLayouter.setNodePlacer(NodePlacer)

Method Summary
 void assignLayerCoordinates(LayoutGraph graph, LayoutDataProvider layoutDataProvider, Layers layers)
          Invoked by HierarchicLayouter before the ports get assigned.
 void assignSequenceCoordinates(LayoutGraph graph, LayoutDataProvider layoutDataProvider, Layers layers, DrawingDistanceCalculator drawingDistanceCalculator)
          Invoked by HierarchicLayouter to determine the resulting x coordinates.
 

Method Detail

assignLayerCoordinates

void assignLayerCoordinates(LayoutGraph graph,
                            LayoutDataProvider layoutDataProvider,
                            Layers layers)
Invoked by HierarchicLayouter before the ports get assigned. This method is used to assign preliminary y coordinates for each layer. The distance between two layers will be adjusted later by the edge routing algorithm. This method is responsible for assigning the relative positions of the nodes within each layer.

Parameters:
graph - the graph that contains the elements
layoutDataProvider - the LayoutDataProvider that contains information about the elements
layers - the Layers that shall be calculated by this method

assignSequenceCoordinates

void assignSequenceCoordinates(LayoutGraph graph,
                               LayoutDataProvider layoutDataProvider,
                               Layers layers,
                               DrawingDistanceCalculator drawingDistanceCalculator)
Invoked by HierarchicLayouter to determine the resulting x coordinates. This method is invoked after all ports have been assigned their final relative coordinates and nodes have been given relative coordinates within each layer.

Parameters:
graph - the graph that contains the elements
layoutDataProvider - the LayoutDataProvider that contains information about the elements
layers - the Layers that shall be calculated by this method
drawingDistanceCalculator - an instance that can be queried to determine the minimum distance between each pair of nodes in the graph

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