Search this API

y.layout.hierarchic.incremental
Interface NodePlacer

All Known Implementing Classes:
SimplexNodePlacer

public interface NodePlacer

This interface is responsible for the assignment of the x-(sequence) and preliminary y-coordinates of the nodes in a hierarchic layout.

Implementations of this interface are used during the drawing phase of HierarchicLayouter. They determine preliminary y-coordinates (which may be adjusted during the final edge routing) and the resulting x-coordinates of all elements that are part of the graph during the node placement phase.

The minimum distance between each pair of nodes of the graph is determined by a DrawingDistanceCalculator instance.

The default implementation used by the HierarchicLayouter is SimplexNodePlacer. Custom implementations of NodePlacer interface can be used for hierarchic layout algorithms using methods HierarchicLayouter.setNodePlacer(NodePlacer) or IncrementalHierarchicLayouter.setNodePlacer(NodePlacer).

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

Method Summary
 void assignLayerCoordinates(LayoutGraph graph, LayoutDataProvider layoutDataProvider, Layers layers)
          Assigns preliminary y-coordinates for each layer of a hierarchic layout.
 void assignSequenceCoordinates(LayoutGraph graph, LayoutDataProvider layoutDataProvider, Layers layers, DrawingDistanceCalculator drawingDistanceCalculator)
          Determines the resulting x-coordinates of a hierarchic layout.
 

Method Detail

assignLayerCoordinates

void assignLayerCoordinates(LayoutGraph graph,
                            LayoutDataProvider layoutDataProvider,
                            Layers layers)
Assigns preliminary y-coordinates for each layer of a hierarchic layout.

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 input graph
layoutDataProvider - the LayoutDataProvider containing information about the elements
layers - the Layers instance that will be calculated by this method

assignSequenceCoordinates

void assignSequenceCoordinates(LayoutGraph graph,
                               LayoutDataProvider layoutDataProvider,
                               Layers layers,
                               DrawingDistanceCalculator drawingDistanceCalculator)
Determines the resulting x-coordinates of a hierarchic layout.

The minimum distance between each pair of nodes of the graph is determined by a DrawingDistanceCalculator instance.

Parameters:
graph - the input graph
layoutDataProvider - the LayoutDataProvider containing information about the elements
layers - the Layers instance that will be calculated by this method
drawingDistanceCalculator - the given DrawingDistanceCalculator instance

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