Search this API

y.layout.hierarchic.incremental
Interface Layerer

All Known Implementing Classes:
AsIsLayerer, AspectRatioComponentLayerer, BFSLayerer, ConstraintIncrementalLayerer, ConstraintLayerer, GivenLayersLayerer, MultiComponentLayerer, OldLayererWrapper, TopologicalIncrementalLayerer, TopologicalLayerer, WeightedLayerer

public interface Layerer

This interface is used by classes capable of generating a layer assignment.

Layer assignment takes place during the first part of the hierarchic layout algorithms. During this phase, each node of the graph is assigned to a layer.

The OldLayererWrapper class can be used for wrapping existing implementations of the y.layout.hierarchic.Layerer interface from the y.layout.hierarchic package.

See Also:
HierarchicLayouter.setLayerer(Layerer), IncrementalHierarchicLayouter.setFixedElementsLayerer(Layerer), IncrementalHierarchicLayouter.setFromScratchLayerer(Layerer)
 

Method Summary
 void assignLayers(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
          Assigns all nodes of the graph to layers and adds them to the Layers instance.
 

Method Detail

assignLayers

void assignLayers(LayoutGraph graph,
                  Layers layers,
                  LayoutDataProvider ldp)
Assigns all nodes of the graph to layers and adds them to the Layers instance.

In order to create new layers, factory method Layers.insert(byte, int) has to be used.

Information about the nodes is provided by a LayoutDataProvider. However, positional information (see NodeData.getPosition() and NodeData.getLayer()) is not available during this phase.

Parameters:
graph - the input graph
layers - the Layers instance that will be filled with the results of the calculation
ldp - the LayoutDataProvider used for querying information about the nodes and edges
See Also:
Layers.insert(byte, int), Layer.add(y.base.Node)

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