Search this API

y.layout.hierarchic.incremental
Class AsIsSequencer

java.lang.Object
  extended by y.layout.hierarchic.incremental.AsIsSequencer
All Implemented Interfaces:
Sequencer

public class AsIsSequencer
extends java.lang.Object
implements Sequencer

This class calculates the sequence of the nodes within each layer using the nodes' coordinates. For layout orientation LayoutOrientation.TOP_TO_BOTTOM, the order corresponds to that obtain when sorting the nodes according to their x-coordinate.

An instance of this class can be set to IncrementalHierarchicLayouter using method IncrementalHierarchicLayouter.setFixedElementsSequencer(Sequencer) and IncrementalHierarchicLayouter.setFromScratchSequencer(Sequencer) respectively.


Initial graph that will be used as sketch

Hierarchic layout when the initial graph is used as sketch

 
Your browser does not support SVG content.

Constructor Summary
AsIsSequencer()
          Creates a new AsIsSequencer instance.
 
Method Summary
 void sequenceNodeLayers(LayoutGraph graph, Layers layers, LayoutDataProvider ldp, ItemFactory itemFactory)
          Calculates the sequence of the nodes within each layer using the nodes' coordinates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AsIsSequencer

public AsIsSequencer()
Creates a new AsIsSequencer instance.

Method Detail

sequenceNodeLayers

public void sequenceNodeLayers(LayoutGraph graph,
                               Layers layers,
                               LayoutDataProvider ldp,
                               ItemFactory itemFactory)
Calculates the sequence of the nodes within each layer using the nodes' coordinates.

This method is called by HierarchicLayouter and finally writes back the calculated sequence using method Layer.setNodeOrder(y.base.YList).

Specified by:
sequenceNodeLayers in interface Sequencer
Parameters:
graph - the input graph
layers - the given Layers instance that defines the layering structure
ldp - the LayoutDataProvider containing information about the nodes and edges of the graph
itemFactory - the ItemFactory used for creating and destroying helper structures

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