public class RecursiveShuffleLayout extends AbstractLayoutStage
Basically, this algorithm combines a RecursiveGroupLayout
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 ILayoutStage
, a core layout algorithm
can be specified. In consequence, this algorithm will perform its work after the core algorithm was executed.
ShuffleLayout
,
RecursiveGroupLayout
Constructor and Description |
---|
RecursiveShuffleLayout()
Creates a new
RecursiveShuffleLayout instance with an optional
core layout algorithm . |
RecursiveShuffleLayout(ILayoutAlgorithm core)
Creates a new
RecursiveShuffleLayout instance with an optional
core layout algorithm . |
Modifier and Type | Method and Description |
---|---|
void |
applyLayout(LayoutGraph graph)
Removes all node overlaps in the given graph, after executing the specified
core layout algorithm . |
IGroupBoundsCalculator |
getGroupBoundsCalculator()
Gets the
IGroupBoundsCalculator instance that computes the sizes of all group nodes. |
ILayoutAlgorithm |
getShuffleLayout()
Gets the
ILayoutAlgorithm instance that is used for removing node overlaps. |
void |
setGroupBoundsCalculator(IGroupBoundsCalculator value)
Sets the
IGroupBoundsCalculator instance that computes the sizes of all group nodes. |
void |
setShuffleLayout(ILayoutAlgorithm value)
Sets the
ILayoutAlgorithm instance that is used for removing node overlaps. |
applyLayoutCore, getCoreLayout, setCoreLayout
public RecursiveShuffleLayout()
RecursiveShuffleLayout
instance with an optional
core layout algorithm
.public RecursiveShuffleLayout(ILayoutAlgorithm core)
RecursiveShuffleLayout
instance with an optional
core layout algorithm
.core
- The core layout algorithm.public void applyLayout(LayoutGraph graph)
core layout algorithm
.applyLayout
in interface ILayoutAlgorithm
applyLayout
in class AbstractLayoutStage
graph
- the input graphpublic IGroupBoundsCalculator getGroupBoundsCalculator()
IGroupBoundsCalculator
instance that computes the sizes of all group nodes.MinimumSizeGroupBoundsCalculator
IGroupBoundsCalculator
instancesetGroupBoundsCalculator(IGroupBoundsCalculator)
public ILayoutAlgorithm getShuffleLayout()
ILayoutAlgorithm
instance that is used for removing node overlaps.
This instance will be applied recursively to all group nodes of the graph.
ShuffleLayout
ILayoutAlgorithm
instance for removing node overlapssetShuffleLayout(ILayoutAlgorithm)
public void setGroupBoundsCalculator(IGroupBoundsCalculator value)
IGroupBoundsCalculator
instance that computes the sizes of all group nodes.MinimumSizeGroupBoundsCalculator
value
- the current IGroupBoundsCalculator
instancegetGroupBoundsCalculator()
public void setShuffleLayout(ILayoutAlgorithm value)
ILayoutAlgorithm
instance that is used for removing node overlaps.
This instance will be applied recursively to all group nodes of the graph.
ShuffleLayout
value
- the ILayoutAlgorithm
instance for removing node overlapsgetShuffleLayout()