|
Search this API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object y.layout.AbstractLayoutStage y.layout.organic.OrganicPartitionGridLayoutStage
public class OrganicPartitionGridLayoutStage
This layout stage enables support for handling a graph with a PartitionGrid
structure.
Before executing the core layout algorithm
, this stage prepares the grid structure of the
graph accordingly, e.g., by hiding top-level grid nodes. Then, the core layout algorithm is applied to the graph.
Finally, the grid is restored, configured and positioned such that it is consistent with the layout computed by
the core algorithm.
Information about the PartitionGrid
structure is retrieved from a DataProvider
registered
with the graph using key PartitionGrid.PARTITION_GRID_DPKEY
.
When using SmartOrganicLayouter
, this stage will automatically be used, if required.
It is not necessary to append this stage manually to SmartOrganicLayouter
.
Appending this stage can be useful to add support for partition grid
structures
to other Layouter
s.
The stage can be appended to all algorithms of type CanonicMultiStageLayouter
by using
method CanonicMultiStageLayouter.appendStage(y.layout.LayoutStage)
.
PartitionGrid
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
OrganicPartitionGridLayoutStage(Layouter core)
Creates a new instance of OrganicPartitionGridLayoutStage with the given layout algorithm as
core algorithm . |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs which are accepted by the specified core layout algorithm . |
void |
doLayout(LayoutGraph graph)
Calculates the layout according to the core layout algorithm , while considering
an existing partition grid structure defined for the graph. |
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 |
---|
public OrganicPartitionGridLayoutStage(Layouter core)
OrganicPartitionGridLayoutStage
with the given layout algorithm as
core algorithm
.
core
- the core layout algorithmMethod Detail |
---|
public boolean canLayout(LayoutGraph graph)
core layout algorithm
.
graph
- the input graph
true
if the core algorithm
can handle the given graph,
false
otherwiseLayouter.doLayout(LayoutGraph)
public void doLayout(LayoutGraph graph)
core layout algorithm
, while considering
an existing partition grid
structure defined for the graph.
If there is no PartitionGrid
defined for the graph, only the core layout algorithm will be executed.
graph
- the input graph
WrongGraphStructure
- if the graph has group nodes whose content spans multiple grid cells or
if the associated group node mode data
is
equal to SmartOrganicLayouter.GROUP_NODE_MODE_FIX_CONTENTS
or
SmartOrganicLayouter.GROUP_NODE_MODE_FIX_BOUNDS
.Layouter.canLayout(LayoutGraph)
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |