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 |
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 there positions in the layers.
|
static class |
SugiyamaLayoutAlgorithm.SimpleLayerProvider |
static class |
SugiyamaLayoutAlgorithm.SplitCrossingReducer
Implements the CrossingReducer interface.
|
Constructor and Description |
---|
SugiyamaLayoutAlgorithm() |
SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir) |
SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir,
Dimension dim) |
SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir,
Dimension dim,
SugiyamaLayoutAlgorithm.LayerProvider layering,
SugiyamaLayoutAlgorithm.CrossingReducer crossing)
Constructs a tree-like, layered layout of a directed graph.
|
SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir,
SugiyamaLayoutAlgorithm.CrossingReducer crossing) |
SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir,
SugiyamaLayoutAlgorithm.LayerProvider layerProvider) |
SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir,
SugiyamaLayoutAlgorithm.LayerProvider layerProvider,
SugiyamaLayoutAlgorithm.CrossingReducer crossing) |
Modifier and Type | Method and Description |
---|---|
void |
applyLayout(boolean clean)
Makes this algorithm perform layout computation and apply it to its
context.
|
ILayoutContext |
getLayoutContext()
Returns the previously set
ILayoutContext . |
void |
setLayoutContext(ILayoutContext context)
Sets the layout context for this algorithm.
|
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)
public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, SugiyamaLayoutAlgorithm.LayerProvider layerProvider)
public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, SugiyamaLayoutAlgorithm.CrossingReducer crossing)
public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir, Dimension dim)
public SugiyamaLayoutAlgorithm(SugiyamaLayoutAlgorithm.Direction dir)
public SugiyamaLayoutAlgorithm()
public void setLayoutContext(ILayoutContext context)
ILayoutAlgorithm
setLayoutContext
in interface ILayoutAlgorithm
context
- a new layout context or null if this algorithm should not
perform any layoutpublic ILayoutContext getLayoutContext()
ILayoutAlgorithm
ILayoutContext
.getLayoutContext
in interface ILayoutAlgorithm
ILayoutContext
public void applyLayout(boolean clean)
ILayoutAlgorithm
applyLayout
in interface ILayoutAlgorithm
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.