Search this API

y.layout.hierarchic.incremental
Class OldLayererWrapper

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

public class OldLayererWrapper
extends Object
implements Layerer

Wraps a Layerer implementation from the y.layout.hierarchic package to behave like a Layerer implementation from the y.layout.hierarchic.incremental package.

See Also:
HierarchicLayouter.setLayerer(Layerer)

Constructor Summary
OldLayererWrapper(Layerer oldLayerer)
          Creates a new instance of OldLayererWrapper, wrapping the given 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.
 Layerer getOldLayerer()
          Returns the y.layout.hierarchic.Layerer instance that is used for delegation.
 void setOldLayerer(Layerer oldLayerer)
          Sets the new delegate Layerer instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OldLayererWrapper

public OldLayererWrapper(Layerer oldLayerer)
Creates a new instance of OldLayererWrapper, wrapping the given layerer.

Parameters:
oldLayerer - the old layerer implementation
Method Detail

assignLayers

public void assignLayers(LayoutGraph graph,
                         Layers layers,
                         LayoutDataProvider ldp)
Description copied from interface: Layerer
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.

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

getOldLayerer

public Layerer getOldLayerer()
Returns the y.layout.hierarchic.Layerer instance that is used for delegation.

Returns:
the delegate instance

setOldLayerer

public void setOldLayerer(Layerer oldLayerer)
Sets the new delegate Layerer instance.

Throws:
NullPointerException - if the argument is null
Parameters:
oldLayerer - the new instance.

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