|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.CanonicMultiStageLayouter
y.layout.tree.GenericTreeLayouter
public class GenericTreeLayouter
This layout algorithm arranges graphs with a tree structure.
GenericTreeLayouter provides multiple different arrangements of trees and subtrees. It is easy to customize
the order of edges, the port assignment and the
arrangement of the nodes for each subtree.
Tree layout algorithms are commonly applied to visualize relational data and produce diagrams of high quality that are able to reveal possible hierarchic properties of the graph. More precisely, they find applications in dataflow analysis, software engineering, bioinformatics and business administration.

Example graph with a layout calculated by GenericTreeLayouter using default settings

Tree layout using different NodePlacers and rotations
The layout algorithm starts from the leaves and continues with their parents, then with the parents of the parents
and so on. When a node is processed, the algorithm will use the corresponding NodePlacer instance to move
its children (along with their subtrees) to a suitable position and to route the outgoing edges of this node. Then,
the next local root node will be processed.
To avoid moving all nodes several times and to know the area that the subtrees occupy, the layout algorithm uses
GenericTreeLayouter.SubtreeShapes. These GenericTreeLayouter.SubtreeShapes are moved and merged during layout calculation.
Each subtree can have a different style of node placement. NodePlacers are responsible for arranging subtrees
and their common root node. They can be specified separately for each local root with a DataProvider
registered with the graph using key NODE_PLACER_DPKEY.
A custom node can be defined as root of the tree using a DataProvider registered with the graph with
key SELECTED_ROOT_DPKEY.
The layout algorithm can be configured to reserve space for node labels and place the edge labels along edges
such that the labels won't overlap with other graph elements. Edge labels are placed according to the information
stored in a PreferredPlacementDescriptor instance. However, the placement along the edge will only
affect the order of multiple labels at the same edge. The algorithm will always place the labels close to the
target node.
Grouping of nodes can also be handled by this layout algorithm. It is important that a group node contains a whole
subtree. Otherwise, the group nodes may overlap with each other or with other nodes. Furthermore, the user may specify
minimum size constraints for each group node using DataProvider key
GroupingKeys.MINIMUM_NODE_SIZE_DPKEY.
GenericTreeLayouter supports custom sorting of the outgoing edges of a node. For example, a
NodePlacer instance that implements FromSketchNodePlacer provides a comparator that keeps the
current order of siblings, allowing to extend the graph incrementally.
Node types are considered such that the type of the nodes is used as a
criterion for sorting the child nodes of a local root node, with the effect that nodes of the same type
are placed consecutively, if possible. The primary ordering criterion is still specified
by the getDefaultChildComparator().
This layout algorithm can only handle graphs with a tree structure. To apply it to a general graph, a
TreeReductionStage can be appended. This stage will temporarily remove some edges of the input graph until
a tree is obtained. After the layout calculation, the stage will reinsert the edges that were removed and route them
separately.
![]() |
![]() |
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static class |
GenericTreeLayouter.SubtreeShape
A GenericTreeLayouter.SubtreeShape represents the position and the borders of a subtree. |
| Field Summary | |
|---|---|
static java.lang.Object |
CHILD_COMPARATOR_DPKEY
A DataProvider key for specifying the comparator for the outgoing edges.
|
static java.lang.Object |
CRITICAL_EDGE_DPKEY
A DataProvider key for defining the priority of critical edges.
|
protected LayoutGraph |
graph
The input graph for which a layout is calculated. |
static java.lang.Object |
MULTI_PARENT_DESCRIPTOR_DPKEY
A DataProvider key for retrieving descriptors for nodes in multi-parent structures.
|
static java.lang.Object |
NODE_PLACER_DPKEY
A DataProvider key for specifying a child node placer for each node.
|
static java.lang.Object |
PORT_ASSIGNMENT_DPKEY
A DataProvider key for assigning ports to nodes.
|
static java.lang.Object |
SELECTED_ROOT_DPKEY
A DataProvider key for marking the node that will be used as root node of the tree.
|
| Fields inherited from interface y.layout.Layouter |
|---|
EDGE_ID_DPKEY, NODE_ID_DPKEY, NODE_TYPE_DPKEY, SELECTED_EDGES, SELECTED_NODES |
| Constructor Summary | |
|---|---|
GenericTreeLayouter()
Creates a new GenericTreeLayouter instance with default settings. |
|
| Method Summary | |
|---|---|
protected boolean |
canLayoutCore(LayoutGraph graph)
Accepts only graphs that are trees. |
protected EdgeList |
directTree()
Returns a list of edges that need to be reversed in order to obtain a valid rooted and directed tree from the input graph. |
protected void |
doLayoutCore(LayoutGraph graph)
Arranges the given graph as a tree. |
protected java.util.Comparator |
getChildNodeInEdgeComparator(Node localRoot)
Returns the Comparator instance that will sort the outgoing edges connecting to the given node. |
java.util.Comparator |
getDefaultChildComparator()
Returns the default Comparator instance that sorts the outgoing edges in all subtrees that do
not have a specific Comparator assigned using a DataProvider. |
NodePlacer |
getDefaultLeafPlacer()
Returns the default NodePlacer instance that places the leaf nodes of the tree. |
NodePlacer |
getDefaultNodePlacer()
Returns the default NodePlacer instance that arranges all subtrees that do not have a specific
NodePlacer assigned using a DataProvider. |
PortAssignment |
getDefaultPortAssignment()
Returns the default PortAssignment instance for all subtrees that do not have a
specific PortAssignment assigned using a DataProvider. |
protected NodePlacer |
getNodePlacer(Node localRoot)
Returns the NodePlacer instance that is used for the placement of the local root node and the
GenericTreeLayouter.SubtreeShapes. |
protected GenericTreeLayouter.SubtreeShape |
getNodeShape(Node node)
Creates a GenericTreeLayouter.SubtreeShape for the given node that consists only of the bounds of this particular node. |
protected PortAssignment |
getPortAssignment(Node localRoot)
Returns the PortAssignment instance that places the ports of the connecting edges of the given node. |
protected Node[] |
getRootsArray(Node root)
Returns an array of the nodes that will be laid out. |
protected DataAcceptor |
getSourceGroupDataAcceptor()
Returns a DataAcceptor that can be used for temporarily overwriting the source group information used
during the layout. |
protected DataAcceptor |
getSourcePortConstraintDataAcceptor()
Returns a DataAcceptor that can overwrite the source port contraint
temporarily used during the layout. |
protected GenericTreeLayouter.SubtreeShape |
getSubtreeShape(Node localRoot)
Provides access to the GenericTreeLayouter.SubtreeShape for the given node. |
protected DataAcceptor |
getTargetGroupDataAcceptor()
Returns a DataAcceptor that can be used for temporarily overwriting the target group information used
during the layout. |
protected DataAcceptor |
getTargetPortConstraintDataAcceptor()
Returns a DataAcceptor that can overwrite the target port contraint
temporarily used during the layout. |
boolean |
isGroupingSupported()
Returns whether or not group nodes are handled by the layout algorithm. |
boolean |
isIntegratedEdgeLabeling()
Returns whether or not edge labels are placed by the layout algorithm. |
boolean |
isIntegratedNodeLabeling()
Returns whether or not the layout algorithm reserves space for node labels. |
boolean |
isMultiParentAllowed()
Determines whether or not multi-parent structures are allowed for this tree layout. |
protected GenericTreeLayouter.SubtreeShape |
layoutRoot(Node localRoot)
Calculates the layout for the given root node and its subtrees. |
protected void |
reverseEdges(EdgeList reversedEdges)
Reverses the direction of given edges. |
void |
setComponentLayouterEnabled(boolean enabled)
Specifies whether or not the LayoutStage used for arranging the components of the graph is activated. |
void |
setDefaultChildComparator(java.util.Comparator defaultChildComparator)
Specifies the default Comparator instance that sorts the outgoing edges in all subtrees that do
not have a specific Comparator assigned using a DataProvider. |
void |
setDefaultLeafPlacer(NodePlacer defaultLeafPlacer)
Specifies the default NodePlacer instance that places the leaf nodes of the tree. |
void |
setDefaultNodePlacer(NodePlacer defaultNodePlacer)
Specifies the default NodePlacer instance that arranges all subtrees that do not have a specific
NodePlacer assigned using a DataProvider. |
void |
setDefaultPortAssignment(PortAssignment defaultPortAssignment)
Specifies the default PortAssignment instance for all subtrees that do not have a
specific PortAssignment assigned using a DataProvider. |
void |
setGroupingSupported(boolean groupingSupported)
Specifies whether or not group nodes are handled by the layout algorithm. |
void |
setIntegratedEdgeLabeling(boolean integratedEdgeLabeling)
Specifies whether or not edge labels are placed by the layout algorithm. |
void |
setIntegratedNodeLabeling(boolean integratedNodeLabeling)
Specifies whether or not the layout algorithm reserves space for node labels. |
void |
setMultiParentAllowed(boolean multiParentAllowed)
Specifies whether or not multi-parent structures should be allowed for this tree layout. |
void |
setParallelEdgeLayouterEnabled(boolean enabled)
Specifies whether or not the LayoutStage used for routing parallel edges is activated. |
void |
setSelfLoopLayouterEnabled(boolean enabled)
Specifies whether or not the LayoutStage used for routing self-loops is activated. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.Object NODE_PLACER_DPKEY
DataProvider key for specifying a child node placer for each node.
setDefaultNodePlacer(NodePlacer)public static final java.lang.Object PORT_ASSIGNMENT_DPKEY
DataProvider key for assigning ports to nodes.
setDefaultPortAssignment(PortAssignment)public static final java.lang.Object CHILD_COMPARATOR_DPKEY
DataProvider key for specifying the comparator for the outgoing edges.
setDefaultChildComparator(Comparator)public static final java.lang.Object CRITICAL_EDGE_DPKEY
DataProvider key for defining the priority of critical edges.
The layout algorithm tries to align each node pair that is connected by a critical edge
(integer value > 0).
This feature can, for example, be used for highlighting different edge paths that are important for a user.
Conflicts between different critical edges are always resolved in favor of the higher priority.
This feature is only supported by the following NodePlacers:
public static final java.lang.Object MULTI_PARENT_DESCRIPTOR_DPKEY
DataProvider key for retrieving descriptors for nodes in multi-parent structures.
The returned descriptor affects the layout of the multi-parent structure.
setMultiParentAllowed(boolean). Furthermore, all nodes that belong to the same multi-parent
structure should return the same descriptor.setMultiParentAllowed(boolean)public static final java.lang.Object SELECTED_ROOT_DPKEY
DataProvider key for marking the node that will be used as root node of the tree.
protected LayoutGraph graph
| Constructor Detail |
|---|
public GenericTreeLayouter()
GenericTreeLayouter instance with default settings.
| Method Detail |
|---|
public boolean isGroupingSupported()
true if grouping is supported, false otherwisesetGroupingSupported(boolean)public void setGroupingSupported(boolean groupingSupported)
groupingSupported - true if grouping should be supported, false otherwise![]() |
public void setComponentLayouterEnabled(boolean enabled)
LayoutStage used for arranging the components of the graph is activated.
setComponentLayouterEnabled in class CanonicMultiStageLayouterGenericTreeLayouter can only handle single components. Disabling
ComponentLayouter will lead to errors during execution.enabled - true if the stage that arranges the graph components is activated,
false otherwiseCanonicMultiStageLayouter.isComponentLayouterEnabled(),
CanonicMultiStageLayouter.setComponentLayouter(LayoutStage),
ComponentLayouterpublic void setParallelEdgeLayouterEnabled(boolean enabled)
LayoutStage used for routing parallel edges is activated.
setParallelEdgeLayouterEnabled in class CanonicMultiStageLayouterGenericTreeLayouter cannot handle parallel edges. Disabling
ParallelEdgeLayouter will lead to errors during execution.enabled - true if the stage responsible for routing parallel edges is activated,
false otherwiseCanonicMultiStageLayouter.isParallelEdgeLayouterEnabled(),
CanonicMultiStageLayouter.setParallelEdgeLayouter(LayoutStage),
ParallelEdgeLayouterpublic void setSelfLoopLayouterEnabled(boolean enabled)
LayoutStage used for routing self-loops is activated.
setSelfLoopLayouterEnabled in class CanonicMultiStageLayouterGenericTreeLayouter cannot handle self-loops. Disabling SelfLoopLayouter will
lead to errors during execution.enabled - true if the stage responsible for routing self-loops is activated, false otherwiseCanonicMultiStageLayouter.isSelfLoopLayouterEnabled(),
CanonicMultiStageLayouter.setSelfLoopLayouter(LayoutStage),
SelfLoopLayouterprotected boolean canLayoutCore(LayoutGraph graph)
If the layout algorithm is configured to handle multi-parent structures, also trees containing multi-parents are accepted.
canLayoutCore in class CanonicMultiStageLayouterTreeReductionStage.graph - the input graph
true if the given graph is a tree (or multi-parent tree), false otherwiseisMultiParentAllowed()protected void doLayoutCore(LayoutGraph graph)
doLayoutCore in class CanonicMultiStageLayoutergraph - the input graphprotected GenericTreeLayouter.SubtreeShape getSubtreeShape(Node localRoot)
GenericTreeLayouter.SubtreeShape for the given node.
The GenericTreeLayouter.SubtreeShape contains information about the current extent and location of the subtree rooted at the
node. It should only be modified during the layout of the parent node. Also, it won't be initialized before the
layout of the corresponding subtree is calculated.
This method updates the GenericTreeLayouter.SubtreeShape in layoutRoot(Node).
localRoot - the root of the subtree
GenericTreeLayouter.SubtreeShape instance if it has already been calculated, null otherwiseprotected GenericTreeLayouter.SubtreeShape layoutRoot(Node localRoot)
This method is invoked for each node in the tree exactly once. Thus, children are always handled before their parents. In this manner, the subtrees already have a layout and can be arranged with their parent.
To retrieve the shapes of the subtrees of all children of the local root, this method uses
getSubtreeShape(Node).
The method may be overridden to add configuration code.
localRoot - the root of the subtree that whose layout is calculated
GenericTreeLayouter.SubtreeShape of the local root node and all of its children and connecting edgesprotected PortAssignment getPortAssignment(Node localRoot)
PortAssignment instance that places the ports of the connecting edges of the given node.
The method may be overridden to return customized PortAssignment instances. It is possible to return a
shared instance for multiple different nodes because the instances are not used after subsequent calls to this
method.
The current implementation returns the PortAssignment defined by the DataProvider registered with
key CHILD_COMPARATOR_DPKEY. It falls back to the default PortAssignment if there is no specific
PortAssignment for the given node.
localRoot - the root of the local subtree
PortAssignment instance that assigns the ports of the edges at the given nodePORT_ASSIGNMENT_DPKEY,
getDefaultPortAssignment()protected java.util.Comparator getChildNodeInEdgeComparator(Node localRoot)
Comparator instance that will sort the outgoing edges connecting to the given node. The
Comparator can be null in case the initial edge order shall be used.
The method may be overridden to return custom Comparator instances. It is possible to return a shared
instance for multiple different nodes because the instances are not used after subsequent calls to this method.
The current implementation returns the Comparator defined in the DataProvider registered with key
CHILD_COMPARATOR_DPKEY. It falls back to the default Comparator if there is no specific
Comparator for the given node.
localRoot - the root of the local subtree
Comparator or null that sorts the outgoing edges of the given nodeCHILD_COMPARATOR_DPKEY,
getDefaultChildComparator()protected NodePlacer getNodePlacer(Node localRoot)
NodePlacer instance that is used for the placement of the local root node and the
GenericTreeLayouter.SubtreeShapes.
The method may be overridden to return custom NodePlacer instances. It is possible to return a shared
instance for multiple different nodes because the instances are not used after subsequent calls to this method.
The current implementation returns the NodePlacer defined by the DataProvider registered with key
NODE_PLACER_DPKEY. It falls back to the default NodePlacer if there is no specific
NodePlacer for the given node.
localRoot - the root of the local subtree
NodePlacer instance that places the subtree below the given local root nodeNODE_PLACER_DPKEY,
getDefaultNodePlacer()protected GenericTreeLayouter.SubtreeShape getNodeShape(Node node)
GenericTreeLayouter.SubtreeShape for the given node that consists only of the bounds of this particular node.
It may also include node labels or NodeHalos.
This method may be overridden to return a custom GenericTreeLayouter.SubtreeShape for the given node.
node - the given node
GenericTreeLayouter.SubtreeShape instanceprotected Node[] getRootsArray(Node root)
This method may be overridden to change the order in which the nodes (and their subtrees) are handled. However, it is important to keep the parents after the successors. Only siblings can change places.
root - the node to be considered as root of the tree
protected EdgeList directTree()
The root node of the tree is either a node marked by a DataProvider registered with the graph
with key SELECTED_ROOT_DPKEY or is defined according to Trees.getRoot(y.base.Graph).
This method is called initially to calculate a rooted tree from the input graph. It may be overridden to apply a custom algorithm that determines which edges need to be reversed.
reverseEdges(EdgeList)protected DataAcceptor getSourcePortConstraintDataAcceptor()
DataAcceptor that can overwrite the source port contraint
temporarily used during the layout.
This method sets temporary source PortConstraints, e.g., after edge reversal. It may be overridden
to handle those PortConstraints separately.
DataAcceptor to associate source PortConstraints with EdgesPortConstraintKeys.SOURCE_PORT_CONSTRAINT_KEYprotected DataAcceptor getTargetPortConstraintDataAcceptor()
DataAcceptor that can overwrite the target port contraint
temporarily used during the layout.
This method sets temporary target PortConstraints, e.g., after edge reversal. It may be overridden
to handle those PortConstraints separately.
DataAcceptor to associate target PortConstraints with EdgesPortConstraintKeys.TARGET_PORT_CONSTRAINT_KEYprotected DataAcceptor getSourceGroupDataAcceptor()
DataAcceptor that can be used for temporarily overwriting the source group information used
during the layout.
This method may be overridden to handle those edge groups separately.
DataAcceptor to associate source edge groups with EdgesPortConstraintKeys.SOURCE_GROUPID_KEYprotected DataAcceptor getTargetGroupDataAcceptor()
DataAcceptor that can be used for temporarily overwriting the target group information used
during the layout.
This method may be overridden to handle those edge groups separately.
DataAcceptor to associate target edge groups with EdgesPortConstraintKeys.TARGET_GROUPID_KEYprotected void reverseEdges(EdgeList reversedEdges)
This method will be called initially after the directTree() method and finally after the layout has been
calculated. It may be overridden to additionally reverse data that depends on the direction of the edges.
reversedEdges - the edges that will be reversedpublic NodePlacer getDefaultNodePlacer()
NodePlacer instance that arranges all subtrees that do not have a specific
NodePlacer assigned using a DataProvider.
NodePlacer instancesetDefaultNodePlacer(NodePlacer),
NODE_PLACER_DPKEYpublic void setDefaultNodePlacer(NodePlacer defaultNodePlacer)
NodePlacer instance that arranges all subtrees that do not have a specific
NodePlacer assigned using a DataProvider.
DefaultNodePlacerdefaultNodePlacer - the default NodePlacer instance
java.lang.IllegalArgumentException - if the default NodePlacer is set to nullNODE_PLACER_DPKEYpublic NodePlacer getDefaultLeafPlacer()
NodePlacer instance that places the leaf nodes of the tree.
NodePlacer instancesetDefaultNodePlacer(NodePlacer)public void setDefaultLeafPlacer(NodePlacer defaultLeafPlacer)
NodePlacer instance that places the leaf nodes of the tree.
LeafPlacerdefaultLeafPlacer - the default NodePlacer instance
java.lang.IllegalArgumentException - if the default NodePlacer is set to nullpublic PortAssignment getDefaultPortAssignment()
PortAssignment instance for all subtrees that do not have a
specific PortAssignment assigned using a DataProvider.
PortAssignment instancesetDefaultPortAssignment(PortAssignment),
PORT_ASSIGNMENT_DPKEYpublic void setDefaultPortAssignment(PortAssignment defaultPortAssignment)
PortAssignment instance for all subtrees that do not have a
specific PortAssignment assigned using a DataProvider.
DefaultPortAssignmentdefaultPortAssignment - the default PortAssignment instance
java.lang.IllegalArgumentException - if the default PortAssignment is set to nullPORT_ASSIGNMENT_DPKEYpublic java.util.Comparator getDefaultChildComparator()
Comparator instance that sorts the outgoing edges in all subtrees that do
not have a specific Comparator assigned using a DataProvider.
Comparator for outgoing edges is null, the order of the edges will be maintained.null if no specific sorting should be donesetDefaultChildComparator(Comparator),
CHILD_COMPARATOR_DPKEYpublic void setDefaultChildComparator(java.util.Comparator defaultChildComparator)
Comparator instance that sorts the outgoing edges in all subtrees that do
not have a specific Comparator assigned using a DataProvider.
Comparator for outgoing edges is null, the order of the edges will be maintained.defaultChildComparator - the new default instance or null if no specific sorting should be doneCHILD_COMPARATOR_DPKEYpublic void setIntegratedNodeLabeling(boolean integratedNodeLabeling)
If this feature is enabled, the GenericTreeLayouter.SubtreeShape of the nodes will also hold
the shapes of its labels.
labeling algorithm will be
overwritten and when disabling it, any currently specified labeling algorithm will be disabled via property
CanonicMultiStageLayouter.setLabelLayouterEnabled(boolean). Therefore, it is recommended to only use this convenience property
instead of manually changing the mentioned other properties.integratedNodeLabeling - true if node labels should be considered, false otherwise![]() false | ![]() true |
public boolean isIntegratedNodeLabeling()
If this is enabled, the GenericTreeLayouter.SubtreeShape of the nodes will be extended by
the shapes of its labels.
labeling algorithm will be
overwritten and when disabling it, any currently specified labeling algorithm will be disabled via property
CanonicMultiStageLayouter.setLabelLayouterEnabled(boolean). Therefore, it is recommended to only use this convenience property
instead of manually changing the mentioned other properties.true if node labels are considered, false otherwisesetIntegratedNodeLabeling(boolean)public boolean isIntegratedEdgeLabeling()
If this is enabled, the GenericTreeLayouter.SubtreeShapes of the subtrees are extended by the
edge labels.
The layout algorithm uses the information of PreferredPlacementDescriptor for an edge label to
determine the corresponding placement. However, edge labels are always placed at the target side of the edge. The
placement along the edge only affects the order of the edge labels at the same edge.
labeling algorithm will be
overwritten and when disabling it, any currently specified labeling algorithm will be disabled via property
CanonicMultiStageLayouter.setLabelLayouterEnabled(boolean). Therefore, it is recommended to only use this convenience property
instead of manually changing the mentioned other properties.true if the layout algorithm places edge labels, false otherwisesetIntegratedEdgeLabeling(boolean)public void setIntegratedEdgeLabeling(boolean integratedEdgeLabeling)
If this is enabled, the GenericTreeLayouter.SubtreeShapes of the subtrees are extended
by the edge labels.
The layout algorithm uses the information of PreferredPlacementDescriptor for an edge label to
determine the corresponding placement. However, edge labels are always placed at the target side of the edge. The
placement along the edge only affects the order of the edge labels at the same edge.
labeling algorithm will be
overwritten and when disabling it, any currently specified labeling algorithm will be disabled via property
CanonicMultiStageLayouter.setLabelLayouterEnabled(boolean). Therefore, it is recommended to only use this convenience property
instead of manually changing the mentioned other properties.integratedEdgeLabeling - true if the layout algorithm should place edge labels,
false otherwise![]() false | ![]() true |
public boolean isMultiParentAllowed()
If multi-parent structures are allowed, the directed input graph may contain structures of multiple nodes that share the same predecessors as well as the same successors. All nodes belonging to such a structure are placed side by side and the incident edges are routed in a bus-style manner.
NodePlacers route their edges, multi-parent structures only
work for some NodePlacer implementations:
DefaultNodePlacer delivers the best results for multi-parent structures. However, routing style
DefaultNodePlacer.ROUTING_FORK_AT_ROOT as well as root alignments
DefaultNodePlacer.ALIGNMENT_LEADING_ON_BUS and
DefaultNodePlacer.ALIGNMENT_TRAILING_ON_BUS are not supported.
DendrogramPlacer supports multi-parent structures.
BusPlacer supports multi-parent structures.
LeftRightPlacer supports multi-parent structures.
true if multi-parent structures are allowed, false otherwisesetMultiParentAllowed(boolean)public void setMultiParentAllowed(boolean multiParentAllowed)
If multi-parent structures are allowed, the directed input graph may contain structures of multiple nodes that share the same predecessors as well as the same successors. All nodes belonging to such a structure are placed side by side and the incident edges are routed in a bus-style manner.
NodePlacers route their edges, multi-parent structures only
work for some NodePlacer implementations:
DefaultNodePlacer delivers the best results for multi-parent structures. However, routing style
DefaultNodePlacer.ROUTING_FORK_AT_ROOT as well as root alignments
DefaultNodePlacer.ALIGNMENT_LEADING_ON_BUS and
DefaultNodePlacer.ALIGNMENT_TRAILING_ON_BUS are not supported.
DendrogramPlacer supports multi-parent structures.
BusPlacer supports multi-parent structures.
LeftRightPlacer supports multi-parent structures.
multiParentAllowed - true if multi-parent structures should be allowed, false
otherwise![]() * |
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||