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 that are capable of generating a layer assignment. Layer assignment takes place during the first part of the algorithm in hierarchic layout algorithms. Each node in the graph is assigned to a layer.
The OldLayererWrapper class can be used to wrap 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)
          This method assigns all nodes in the graph to layers and registers them in the Layers instance.
 

Method Detail

assignLayers

void assignLayers(LayoutGraph graph,
                  Layers layers,
                  LayoutDataProvider ldp)
This method assigns all nodes in the graph to layers and registers them in the Layers instance. In order to create new layers, the factory method Layers.insert(byte, int) must be used.

Parameters:
graph - the graph that contains the nodes that should be distributed into the layers
layers - the object that will be filled with the results of the calculation
ldp - LayoutDataProvider that can be used to query information about the nodes - note that positional information (see NodeData.getPosition() and NodeData.getLayer()) cannot be available at any time.
See Also:
Layers.insert(byte, int), Layer.add(y.base.Node)

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