public class SugiyamaLayoutAlgorithm extends java.lang.Object implements ILayoutAlgorithm
Modifier and Type | Class and Description |
---|---|
static class |
SugiyamaLayoutAlgorithm.BarycentricCrossingReducer |
static interface |
SugiyamaLayoutAlgorithm.CrossingReducer
An interface for heuristics that reduces edge crossings.
|
static class |
SugiyamaLayoutAlgorithm.DFSLayerProvider
Processing the nodes based on depth first search and creating a list of
layers
|
static class |
SugiyamaLayoutAlgorithm.Direction
Specifies the direction for the
SugiyamaLayoutAlgorithm . |
static class |
SugiyamaLayoutAlgorithm.GreedyCrossingReducer
Implemented the CrossingReducer interface.
|
static interface |
SugiyamaLayoutAlgorithm.LayerProvider
An interface for creating layers.
|
static class |
SugiyamaLayoutAlgorithm.NodeWrapper
Structure to store nodes and their positions in the layers.
|
static class |
SugiyamaLayoutAlgorithm.SimpleLayerProvider |
static class |
SugiyamaLayoutAlgorithm.SplitCrossingReducer
Implements the CrossingReducer interface.
|
Modifier and Type | Method and Description |
---|---|
void |
applyLayout(LayoutContext layoutContext,
boolean clean)
Makes this algorithm perform layout computation and apply it to its
context.
|
public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, Dimension dim, SugiyamaLayoutAlgorithm.LayerProvider layering, SugiyamaLayoutAlgorithm.CrossingReducer crossing)
dir
- SugiyamaLayoutAlgorithm.Direction.HORIZONTAL
: left to right -
SugiyamaLayoutAlgorithm.Direction.VERTICAL
: top to bottomdim
- - desired size of the layout area. Uses the BOUNDS_PROPERTY of
the LayoutContext if not setlayering
- - implementation of LayerProvider interfacecrossing
- - implementation of CrossingReducer interfacepublic SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, SugiyamaLayoutAlgorithm.LayerProvider layerProvider, SugiyamaLayoutAlgorithm.CrossingReducer crossing)
SugiyamaLayoutAlgorithm
with the given
SugiyamaLayoutAlgorithm.Direction
, SugiyamaLayoutAlgorithm.LayerProvider
, and SugiyamaLayoutAlgorithm.CrossingReducer
.dir
- The SugiyamaLayoutAlgorithm.Direction
for this SugiyamaLayoutAlgorithm
.layerProvider
- The LayerProvider for this SugiyamaLayoutAlgorithm
.crossing
- The CrossingReducer for this SugiyamaLayoutAlgorithm
.public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, SugiyamaLayoutAlgorithm.LayerProvider layerProvider)
SugiyamaLayoutAlgorithm
with the given
SugiyamaLayoutAlgorithm.Direction
, SugiyamaLayoutAlgorithm.LayerProvider
, and a
SugiyamaLayoutAlgorithm.BarycentricCrossingReducer
.dir
- The SugiyamaLayoutAlgorithm.Direction
for this SugiyamaLayoutAlgorithm
.layerProvider
- The LayerProvider for this SugiyamaLayoutAlgorithm
.public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, SugiyamaLayoutAlgorithm.CrossingReducer crossing)
SugiyamaLayoutAlgorithm
with the given
SugiyamaLayoutAlgorithm.Direction
, and SugiyamaLayoutAlgorithm.CrossingReducer
.dir
- The SugiyamaLayoutAlgorithm.Direction
for this SugiyamaLayoutAlgorithm
.crossing
- The CrossingReducer for this SugiyamaLayoutAlgorithm
.public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, Dimension dim)
SugiyamaLayoutAlgorithm
with the given
SugiyamaLayoutAlgorithm.Direction
, and the given dimension.dir
- The SugiyamaLayoutAlgorithm.Direction
for this SugiyamaLayoutAlgorithm
.dim
- The desired size of the layout area. Uses the BOUNDS_PROPERTY
of the LayoutContext if not set.public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir)
SugiyamaLayoutAlgorithm
with the given
SugiyamaLayoutAlgorithm.Direction
.dir
- The SugiyamaLayoutAlgorithm.Direction
for this SugiyamaLayoutAlgorithm
.public SugiyamaLayoutAlgorithm()
SugiyamaLayoutAlgorithm
with
SugiyamaLayoutAlgorithm.Direction.VERTICAL
direction.public void applyLayout(LayoutContext layoutContext, boolean clean)
ILayoutAlgorithm
applyLayout
in interface ILayoutAlgorithm
layoutContext
- The LayoutContext
that provides all relevant
information about what to layout.clean
- if true the receiver should assume that the layout context has
changed significantly and recompute the whole layout even if
it keeps track of changes with listeners. False can be used
after dynamic layout in a context is turned back on so that
layout algorithm working in background can apply accumulated
changes. Static layout algorithm can ignore this call entirely
if clean is false.Copyright (c) 2014 itemis AG and others. All rights reserved.