|
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.GroupedShuffleLayouter
public class GroupedShuffleLayouter
This algorithm recursively removes node overlaps from a graph with a hierarchic group structure.
Basically, this algorithm combines a RecursiveGroupLayouter
with a specific customizable
shuffle algorithm
as its
core layout algorithm
.
The shuffle algorithm will be recursively applied to all groups of the input graph to remove node overlaps.
Input graph (left) and result (right) after executing this algorithm with default settings
Since this algorithm is a LayoutStage
, a core layout algorithm
can be specified. In consequence, this algorithm will perform its work after the core algorithm was executed.
ShuffleLayouter
,
RecursiveGroupLayouter
Field Summary |
---|
Fields inherited from interface y.layout.Layouter |
---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
Constructor Summary | |
---|---|
GroupedShuffleLayouter()
Creates a new GroupedShuffleLayouter instance with default settings. |
|
GroupedShuffleLayouter(Layouter core)
Creates a new GroupedShuffleLayouter instance using the given core layout algorithm . |
Method Summary | |
---|---|
boolean |
canLayout(LayoutGraph graph)
Accepts all graphs that the specified core layout algorithm accepts. |
void |
doLayout(LayoutGraph graph)
Removes all node overlaps in the given graph, after executing the specified core layout algorithm . |
GroupBoundsCalculator |
getGroupBoundsCalculator()
Returns the GroupBoundsCalculator instance that computes the sizes of all group nodes. |
Layouter |
getShuffleLayouter()
Returns the Layouter instance that is used for removing node overlaps. |
void |
setGroupBoundsCalculator(GroupBoundsCalculator groupBoundsCalculator)
Specifies the GroupBoundsCalculator instance that computes the sizes of all group nodes. |
void |
setShuffleLayouter(Layouter shuffleLayouter)
Specifies the Layouter instance that is used for removing node overlaps. |
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 GroupedShuffleLayouter()
GroupedShuffleLayouter
instance with default settings.
public GroupedShuffleLayouter(Layouter core)
GroupedShuffleLayouter
instance using the given core layout algorithm
.
core
- the core layout algorithmMethod Detail |
---|
public boolean canLayout(LayoutGraph graph)
core layout algorithm
accepts.
Furthermore, the current shuffle layout algorithm
is not allowed to be
null
.
graph
- the input graph
true
if the core layouter
accepts the given graph and the
shuffle layout algorithm
is not null
,
false
otherwiseLayouter.doLayout(LayoutGraph)
public void doLayout(LayoutGraph graph)
core layout algorithm
.
graph
- the input graphLayouter.canLayout(LayoutGraph)
public GroupBoundsCalculator getGroupBoundsCalculator()
GroupBoundsCalculator
instance that computes the sizes of all group nodes.
GroupBoundsCalculator
instancesetGroupBoundsCalculator(GroupBoundsCalculator)
public void setGroupBoundsCalculator(GroupBoundsCalculator groupBoundsCalculator)
GroupBoundsCalculator
instance that computes the sizes of all group nodes.
MinimumSizeGroupBoundsCalculator
groupBoundsCalculator
- the GroupBoundsCalculator
instance that should be usedpublic Layouter getShuffleLayouter()
Layouter
instance that is used for removing node overlaps.
This instance will be applied recursively to all group nodes of the graph.
ShuffleLayouter
Layouter
instance for removing node overlapssetShuffleLayouter(Layouter)
public void setShuffleLayouter(Layouter shuffleLayouter)
Layouter
instance that is used for removing node overlaps.
This instance will be applied recursively to all group nodes of the graph.
shuffleLayouter
- the Layouter
instance for removing node overlaps
|
© Copyright 2000-2022, yWorks GmbH. All rights reserved. |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |