Search this API

y.layout.hierarchic.incremental
Class PartitionGridLayoutStage

java.lang.Object
  extended by y.layout.AbstractLayoutStage
      extended by y.layout.hierarchic.incremental.PartitionGridLayoutStage
All Implemented Interfaces:
Layouter, LayoutStage

public class PartitionGridLayoutStage
extends AbstractLayoutStage

This class implements a layout stage that handles a given partition grid structure.

Information about the partition grid structure are held by a DataProvider registered with the graph with key PartitionGrid.PARTITION_GRID_DPKEY.

 
This stage is automatically added by the IncrementalHierarchicLayouter, if required.
See Also:
PartitionGrid, IncrementalHierarchicLayouter
 
Your browser does not support SVG content.

Field Summary
 
Fields inherited from interface y.layout.Layouter
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES
 
Constructor Summary
PartitionGridLayoutStage()
          Creates a new instance of PartitionGridLayoutStage.
 
Method Summary
 boolean canLayout(LayoutGraph graph)
          Accepts all graphs that are accepted by the specified core layout algorithm.
 void doLayout(LayoutGraph graph)
          Calculates the layout based on a PartitionGrid structure.
 
Methods inherited from class y.layout.AbstractLayoutStage
canLayoutCore, doLayoutCore, getCoreLayouter, setCoreLayouter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PartitionGridLayoutStage

public PartitionGridLayoutStage()
Creates a new instance of PartitionGridLayoutStage.

Method Detail

canLayout

public boolean canLayout(LayoutGraph graph)
Accepts all graphs that are accepted by the specified core layout algorithm.

Parameters:
graph - the input graph
Returns:
true if the core layout algorithm accepts this graph or is null, false otherwise.
See Also:
Layouter.doLayout(LayoutGraph)

doLayout

public void doLayout(LayoutGraph graph)
Calculates the layout based on a PartitionGrid structure.

If no PartitionGrid structure exists, the core layouter will be called immediately.

 
The given graph will not be copied during the layout process and the layout will be immediately applied to the given graph.
Parameters:
graph - the input graph
See Also:
Layouter.canLayout(LayoutGraph)

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