Search this API

y.layout.hierarchic.incremental
Class GroupingSupport

java.lang.Object
  extended by y.layout.hierarchic.incremental.GroupingSupport

public class GroupingSupport
extends Object

Helper class that is used to manage hierarchically grouped graphs.


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)
           
 void assignLabelNodesToGroups(Layers layers, ItemFactory itemFactory)
           
 NodeList getChildren(Node groupNode)
          Returns the direct children of the given group node.
 NodeList getDecendants(Node groupNode)
          Returns all direct and indirect children of the given group node.
 double getMinimumGroupDistance()
           
 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 adjacent 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 direct or indirect child 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)
           
 void setMinimumGroupDistance(double minimumGroupDistance)
           
 void unhideGroupNodes()
          Unhides all previously hidden group nodes and adjacent edges
 void visitDecendants(Node groupNode, GroupingSupport.Visitor visitor)
          Visits all descendants 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

hideGroupNodes

public void hideGroupNodes()
Hides the group nodes and adjacent edges from the graph.


unhideGroupNodes

public void unhideGroupNodes()
Unhides all previously hidden group nodes and adjacent edges


getMinimumGroupDistance

public double getMinimumGroupDistance()

setMinimumGroupDistance

public void setMinimumGroupDistance(double minimumGroupDistance)

assignEdgeGroupNodesToGroups

public void assignEdgeGroupNodesToGroups(Layers layers)

removeEdgeGroupAssignment

public void removeEdgeGroupAssignment(Layers layers)

isGroupNode

public boolean isGroupNode(Node node)
Returns whether or not the given node is a non-empty group node.


assignLabelNodesToGroups

public void assignLabelNodesToGroups(Layers layers,
                                     ItemFactory itemFactory)

isActive

public boolean isActive()
Returns whether or not groupingSupport is active. All return values of the methods of this class will be invalid if groupingSupport is inactive.


visitDecendants

public void visitDecendants(Node groupNode,
                            GroupingSupport.Visitor visitor)
Visits all descendants of the given group node.


getDecendants

public NodeList getDecendants(Node groupNode)
Returns all direct and indirect children of the given group node.


getChildren

public NodeList getChildren(Node groupNode)
Returns the direct children of the given group node.


getParentNode

public Node getParentNode(Node node)
Returns the parent group node of the given node, or null if the given node is a top-level node.


isDescendant

public boolean isDescendant(Node node,
                            Node groupNode)
Returns whether or not the given node is a direct or indirect child of the given group node.


© Copyright 2000-2013,
yWorks GmbH.
All rights reserved.