|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.tree.GroupedNodePlacer
public class GroupedNodePlacer
This NodePlacer places the children of a local root in groups.
The groups are determined by the grouping of the edges that connect the children to its root.
The placement of the groups is specified by a NodePlacer which will consider grouped children as one child.
The children within a group are placed by another NodePlacer.

There are three edge groups whose target nodes are placed above each other
PortConstraintKeys.SOURCE_GROUPID_KEY,
PortConstraintKeys.TARGET_GROUPID_KEY![]() |
![]() |
| Field Summary |
|---|
| Fields inherited from interface y.layout.tree.NodePlacer |
|---|
DIRECTION_ANY, DIRECTION_EAST, DIRECTION_NONE, DIRECTION_NORTH, DIRECTION_SOUTH, DIRECTION_WEST |
| Constructor Summary | |
|---|---|
GroupedNodePlacer(NodePlacer groupPlacer,
NodePlacer childPlacer)
Creates a new GroupedNodePlacer instance. |
|
| Method Summary | |
|---|---|
Processor |
createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
Creates a Processor that prepares the graph for edge grouping. |
void |
determineChildConnectors(Node localRoot,
DataMap connectorMap)
Delegates to the NodePlacer responsible for arranging the nodes in one group. |
GenericTreeLayouter.SubtreeShape |
placeSubtree(DataProvider nodeShapeProvider,
DataProvider subtreeShapeProvider,
LayoutGraph graph,
Node localRoot,
byte parentConnectorDirection)
Places the groups of GenericTreeLayouter.SubtreeShapes according to their group IDs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GroupedNodePlacer(NodePlacer groupPlacer,
NodePlacer childPlacer)
GroupedNodePlacer instance.
groupPlacer - the NodePlacer which places the child groupschildPlacer - the NodePlacer which places the children within their group| Method Detail |
|---|
public void determineChildConnectors(Node localRoot,
DataMap connectorMap)
NodePlacer responsible for arranging the nodes in one group.
determineChildConnectors in interface NodePlacerlocalRoot - the local root nodeconnectorMap - the map used for storing the direction specifiers of the child nodes
public GenericTreeLayouter.SubtreeShape placeSubtree(DataProvider nodeShapeProvider,
DataProvider subtreeShapeProvider,
LayoutGraph graph,
Node localRoot,
byte parentConnectorDirection)
GenericTreeLayouter.SubtreeShapes according to their group IDs.
placeSubtree in interface NodePlacernodeShapeProvider - the DataProvider for obtaining an initial shape of the root nodesubtreeShapeProvider - the DataProvider for accessing the pre-calculated shapes of the subtreesgraph - the input graphlocalRoot - the root of the subtree that should be arranged by this methodparentConnectorDirection - the direction specifier for the connector of the local root node to its parent node
GenericTreeLayouter.SubtreeShapes of the local root and its childrenPortConstraintKeys.SOURCE_GROUPID_KEY,
PortConstraintKeys.TARGET_GROUPID_KEY
public Processor createProcessor(GenericTreeLayouter layouter,
LayoutGraph graph,
Node currentRoot)
Processor that prepares the graph for edge grouping.
In a pre-processing step, the Processor inserts a dummy node for each edge group and connects it to the
local root and the edges of the according group. The child node placer is assigned to those dummy nodes and will
arrange them during the layout calculation.
The changes to the graph are restored in a post-processing step.
createProcessor in interface NodePlacerlayouter - the current GenericTreeLayouter instancegraph - the input graphcurrentRoot - the root node handled by this NodePlacer
Processor responsible for preparing the graphPortConstraintKeys.SOURCE_GROUPID_KEY,
PortConstraintKeys.TARGET_GROUPID_KEY
|
© Copyright 2000-2025, yWorks GmbH. All rights reserved. |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||