Search this API

y.layout.hierarchic.incremental
Class TopologicalIncrementalLayerer

java.lang.Object
  extended by y.layout.hierarchic.incremental.TopologicalIncrementalLayerer
All Implemented Interfaces:
Layerer

public class TopologicalIncrementalLayerer
extends java.lang.Object
implements Layerer

This class is a Layerer implementation that inserts nodes incrementally into an existing layer structure, without destroying the existing layout.

Nodes are inserted such that the length of backward pointing edges is minimized (not their number!). The method implemented will insert new layers into the current layering, if necessary, at locally optimal positions.

 

Constructor Summary
TopologicalIncrementalLayerer()
          Creates a new instance of TopologicalIncrementalLayerer.
 
Method Summary
 void assignLayers(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
          Calculates an optimal layering for incremental nodes.
 LayeredComponentsMerger getLayeredComponentsMerger()
          Returns the LayeredComponentsMerger instance used for merging the layers of separate components into the current layering.
 Layerer getSeparateComponentsLayerer()
          Returns the Layerer instance used for the layering of separate components.
 void setLayeredComponentsMerger(LayeredComponentsMerger layeredComponentsMerger)
          Specifies the LayeredComponentsMerger instance used for merging the layers of separate components into the current layering.
 void setSeparateComponentsLayerer(Layerer separateComponentsLayerer)
          Specifies the Layerer instance used for the layering of separate components.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TopologicalIncrementalLayerer

public TopologicalIncrementalLayerer()
Creates a new instance of TopologicalIncrementalLayerer.

Method Detail

assignLayers

public void assignLayers(LayoutGraph graph,
                         Layers layers,
                         LayoutDataProvider ldp)
Calculates an optimal layering for incremental nodes.

Specified by:
assignLayers in interface Layerer
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)

getSeparateComponentsLayerer

public Layerer getSeparateComponentsLayerer()
Returns the Layerer instance used for the layering of separate components.

Returns:
the Layerer instance used for layering the separate components
See Also:
setSeparateComponentsLayerer(Layerer)

setSeparateComponentsLayerer

public void setSeparateComponentsLayerer(Layerer separateComponentsLayerer)
Specifies the Layerer instance used for the layering of separate components.

Default Value:
The default value is OldLayererWrapper. An instance of OldLayererWrapper wrapping a WeightedLayerer will be used for the layering of separate components.
Parameters:
separateComponentsLayerer - the given Layerer instance for layering the separate components
Throws:
java.lang.IllegalArgumentException - if the specified Layerer is null

getLayeredComponentsMerger

public LayeredComponentsMerger getLayeredComponentsMerger()
Returns the LayeredComponentsMerger instance used for merging the layers of separate components into the current layering.

Returns:
the LayeredComponentsMerger instance used for merging the layers of separate components
See Also:
setLayeredComponentsMerger(LayeredComponentsMerger)

setLayeredComponentsMerger

public void setLayeredComponentsMerger(LayeredComponentsMerger layeredComponentsMerger)
Specifies the LayeredComponentsMerger instance used for merging the layers of separate components into the current layering.

Default Value:
The default value is DefaultLayeredComponentsMerger
Parameters:
layeredComponentsMerger - the given LayeredComponentsMerger instance
Throws:
java.lang.IllegalArgumentException - if the specified LayeredComponentsMerger is null

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