|
Search this API | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecty.layout.hierarchic.incremental.GroupingSupport
public class GroupingSupport
This class is responsible for managing hierarchically grouped graphs.
The grouping information is provided through DataProviders registered with the graph with keys
GroupingKeys.NODE_ID_DPKEY, GroupingKeys.PARENT_NODE_ID_DPKEY and
GroupingKeys.GROUP_DPKEY.
Grouping,
GroupingKeys![]() |
![]() |
![]() |
![]() |
| Nested Class Summary | |
|---|---|
static interface |
GroupingSupport.Visitor
Visitor interface that can be used to traverse the descendants of a group node |
| Method Summary | |
|---|---|
void |
assignEdgeGroupNodesToGroups(Layers layers)
Assigns edge group nodes to groups based on a given Layers instance. |
void |
assignLabelNodesToGroups(Layers layers,
ItemFactory itemFactory)
Assigns label nodes to groups. |
NodeList |
getChildren(Node groupNode)
Returns the direct children of the given group node. |
NodeList |
getDecendants(Node groupNode)
Returns the descendant Nodes of the given group node. |
double |
getMinimumGroupDistance()
Returns the minimum distance between group nodes. |
Node |
getParentNode(Node node)
Returns the parent group node of the given Node or null if the given node is a top-level node. |
void |
hideGroupNodes()
Hides the group nodes and incident edges from the graph. |
boolean |
isActive()
Returns whether or not GroupingSupport is active. |
boolean |
isDescendant(Node node,
Node groupNode)
Returns whether or not the given node is a descendant Node of the given group node. |
boolean |
isGroupNode(Node node)
Returns whether or not the given Node is a non-empty group node. |
void |
removeEdgeGroupAssignment(Layers layers)
Removes the current assignment of source/target edge groups from a given Layers instance. |
void |
setMinimumGroupDistance(double minimumGroupDistance)
Specifies the minimum distance between group nodes. |
void |
unhideGroupNodes()
Un-hides all previously hidden group nodes and incident edges. |
void |
visitDecendants(Node groupNode,
GroupingSupport.Visitor visitor)
Visits all descendant Nodes of the given group node. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public void hideGroupNodes()
public void unhideGroupNodes()
public double getMinimumGroupDistance()
The minimum distance should be greater than 0.
setMinimumGroupDistance(double)public void setMinimumGroupDistance(double minimumGroupDistance)
The minimum distance should be greater than 0.
public void assignEdgeGroupNodesToGroups(Layers layers)
Layers instance.
isActive() returns true.layers - the given Layers instance containing the elements in the layeringNodeData.TYPE_SOURCE_GROUP_NODE,
NodeData.TYPE_TARGET_GROUP_NODEpublic void removeEdgeGroupAssignment(Layers layers)
Layers instance.
isActive() returns true.layers - the given Layers instance containing the elements in the layeringNodeData.TYPE_SOURCE_GROUP_NODE,
NodeData.TYPE_TARGET_GROUP_NODEpublic boolean isGroupNode(Node node)
Node is a non-empty group node.
false if GroupingSupport is not active.node - the given Node
true if the given node is a non-empty group node, false otherwise
public void assignLabelNodesToGroups(Layers layers,
ItemFactory itemFactory)
isActive() returns true.layers - the given Layers instance containing the elements in the layeringitemFactory - the ItemFactory used temporarily for modifying the graph instanceNodeData.TYPE_LABEL,
NodeData.TYPE_BEND,
NodeData.TYPE_GROUP_BEGIN,
NodeData.TYPE_GROUP_ENDpublic boolean isActive()
GroupingSupport is active.
GroupingSupport is inactive.true if GroupingSupport is active, false otherwise
public void visitDecendants(Node groupNode,
GroupingSupport.Visitor visitor)
Nodes of the given group node.
The descendants are all direct or indirect children of a group node.
isActive() returns true.groupNode - the given group nodevisitor - a GroupingSupport.Visitor implementationpublic NodeList getDecendants(Node groupNode)
Nodes of the given group node.
The descendants are all direct or indirect children of a group node.
null if GroupingSupport is not active.groupNode - the given group node
NodeList of all descendants or null if GroupingSupport
is not active![]() The marked nodes are descendants of group node 5 (grouped graph) | ![]() The marked nodes are descendants of group node 5(hierarchy tree) |
public NodeList getChildren(Node groupNode)
null if GroupingSupport is not active.groupNode - the given group node
NodeList of all direct children or null if GroupingSupport
is not active![]() The marked nodes are children of group node 5 (grouped graph) | ![]() The marked nodes are children of group node 5 (hierarchy tree) |
public Node getParentNode(Node node)
Node or null if the given node is a top-level node.
null if GroupingSupport is not active.node - the given Node
null if the given node is a top-level node or if GroupingSupport
is not active
public boolean isDescendant(Node node,
Node groupNode)
Node of the given group node.
The descendants are all direct or indirect children of a group node.
node - the given nodegroupNode - the given group node
true if the given node is a descendant of the given group node, 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 | ||||||||