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 java.lang.Object
implements Layerer

This class wraps a Layerer implementation from y.layout.hierarchic package to behave like a Layerer implementation from y.layout.hierarchic.incremental package.

See Also:
HierarchicLayouter.setLayerer(Layerer)
 

Constructor Summary
OldLayererWrapper(Layerer oldLayerer)
          Creates a new instance of OldLayererWrapper that wraps the given layerer instance.
 
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.
 Layerer getOldLayerer()
          Returns the delegate layerer instance.
 void setOldLayerer(Layerer oldLayerer)
          Specifies the 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 that wraps the given layerer instance.

Parameters:
oldLayerer - the old layerer implementation
Throws:
java.lang.IllegalArgumentException - if the given old layerer is null
Method Detail

assignLayers

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

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)

getOldLayerer

public Layerer getOldLayerer()
Returns the delegate layerer instance.

Returns:
a layerer instance

setOldLayerer

public void setOldLayerer(Layerer oldLayerer)
Specifies the delegate layerer instance.

Parameters:
oldLayerer - the given layerer instance
Throws:
java.lang.IllegalArgumentException - if the specified Layerer is null

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