public static class SugiyamaLayoutAlgorithm.DFSLayerProvider extends java.lang.Object implements SugiyamaLayoutAlgorithm.LayerProvider
Constructor and Description |
---|
DFSLayerProvider() |
Modifier and Type | Method and Description |
---|---|
void |
addAssignedNode(INodeLayout node,
int layer)
Assigns the given layer to the given
INodeLayout . |
java.util.List<java.util.List<SugiyamaLayoutAlgorithm.NodeWrapper>> |
calculateLayers(java.util.List<INodeLayout> nodeLayouts)
Creating layers of the nodes and makes it possible to assign layers
to those nodes.
|
void |
clearAssignedNodes()
Clears the
Map that stores the layer assignments. |
java.util.Map<INodeLayout,java.lang.Integer> |
getAssignedNodes()
Returns a
Map that stores the assignment of layers to
INodeLayout s. |
java.util.ArrayList<INodeLayout> |
getRoots(java.util.List<INodeLayout> nodes)
Finds the root elements in the list of nodes based on their
connections.
|
public java.util.ArrayList<INodeLayout> getRoots(java.util.List<INodeLayout> nodes)
nodes
- The list of INodeLayout
s for which to find the
root elements.public java.util.Map<INodeLayout,java.lang.Integer> getAssignedNodes()
Map
that stores the assignment of layers to
INodeLayout
s.Map
that stores the assignment of layers to
INodeLayout
s.public void addAssignedNode(INodeLayout node, int layer)
INodeLayout
.node
- The INodeLayout
to which a layer is assigned.layer
- The layer that is assigned to that INodeLayout
.public void clearAssignedNodes()
Map
that stores the layer assignments.public java.util.List<java.util.List<SugiyamaLayoutAlgorithm.NodeWrapper>> calculateLayers(java.util.List<INodeLayout> nodeLayouts)
SugiyamaLayoutAlgorithm.LayerProvider
calculateLayers
in interface SugiyamaLayoutAlgorithm.LayerProvider
nodeLayouts
- List of all the nodes that needs to be organizedSugiyamaLayoutAlgorithm.NodeWrapper
sCopyright (c) 2014 itemis AG and others. All rights reserved.