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 Object
implements Layerer

Inserts nodes incrementally into an existing layer structure, without destroying the latter. Nodes are inserted such that the length of backwards 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 IncrementalLayerer
 
Method Summary
 void assignLayers(LayoutGraph graph, Layers layers, LayoutDataProvider ldp)
          Calculates an optimal layering for incremental nodes
 LayeredComponentsMerger getLayeredComponentsMerger()
          Returns the LayeredComponentsMerger instance that will be used to merge 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)
          Sets the LayeredComponentsMerger instance that will be used to merge the layers of separate components into the current layering.
 void setSeparateComponentsLayerer(Layerer separateComponentsLayerer)
          Sets 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 IncrementalLayerer

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 graph containing all nodes in layers and all nodes in incrementalNodes as well as the respective edges.
layers - the Layers structure containing all nodes but the incremental ones.
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)

getSeparateComponentsLayerer

public Layerer getSeparateComponentsLayerer()
Returns the Layerer instance used for the layering of separate components. Default is an instance of OldLayererWrapper wrapping a WeightedLayerer.

Returns:
the currently used Layerer for separate components

setSeparateComponentsLayerer

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

Parameters:
separateComponentsLayerer - the layerer instance for the layering of separate components.

getLayeredComponentsMerger

public LayeredComponentsMerger getLayeredComponentsMerger()
Returns the LayeredComponentsMerger instance that will be used to merge the layers of separate components into the current layering. Default is DefaultLayeredComponentsMerger

Returns:
the current merger

setLayeredComponentsMerger

public void setLayeredComponentsMerger(LayeredComponentsMerger layeredComponentsMerger)
Sets the LayeredComponentsMerger instance that will be used to merge the layers of separate components into the current layering.

Parameters:
layeredComponentsMerger - the new merger

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