|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.layout.grouping.Grouping
Instances of this class can be used by algorithms to efficiently query the structure of such type of graphs. The grouping information is provided through DataProviders, whose keys are defined in the GroupingKeys interface.
Field Summary |
Fields inherited from interface y.layout.grouping.GroupingKeys |
GROUP_DPKEY, GROUP_NODE_INSETS_DPKEY, NODE_ID_DPKEY, PARENT_NODE_ID_DPKEY |
Constructor Summary | |
Grouping(LayoutGraph graph)
Creates a new instance of Grouping. |
Method Summary | |
protected NodeMap |
createInfoMap(LayoutGraph graph)
factory method for a NodeMap |
void |
dispose()
Disposes the datastructures held by this instance. |
protected void |
disposeInfoMap(LayoutGraph graph,
NodeMap infoMap)
factory desctructor method for a the NodeMap |
NodeList |
getChildren(Node parent)
Returns the children of the given group node as a NodeList. |
NodeList |
getDescendants(Node parent)
Returns all descendants of the given group node as a NodeList. |
EdgeList |
getEdgesGoingIn(Node groupNode)
Convenience method that returns a list of all Edges crossing the group node boundary of the given group node in such a way, that there target is inside the group node and the source does not lie inside the groupnode. |
EdgeList |
getEdgesGoingOut(Node groupNode)
Convenience method that returns a list of all Edges crossing the group node boundary of the given group node in such a way, that there target is outside the group node and the source does not lie outside the groupnode. |
LayoutGraph |
getLayoutGraph()
Returns the graph instance this object provides information for. |
Node |
getParent(Node node)
Returns the parent of the given node or null if the node
is at the top of the hierarchy |
Node |
getRepresentative(Node node,
Node inGroup)
Convenience method that returns the node whica list of all Edges crossing the group node boundary of the given group node in such a way, that there target is outside the group node and the source does not lie outside the groupnode. |
Node |
getRoot()
Returns a node instance that can be used as a handle to the virtual root of the node hierarchy. |
protected void |
init()
Initializes internal datastructures. |
static boolean |
isFlat(Graph graph)
A graph is considered to be flat if it is either not grouped or there is no group node that contains child nodes present in the graph. |
static boolean |
isGrouped(Graph graph)
A graph is considered to be grouped if the three low-level grouping data providers GroupingKeys.GROUP_DPKEY ,
GroupingKeys.NODE_ID_DPKEY and GroupingKeys.PARENT_NODE_ID_DPKEY
are registered.
|
boolean |
isGroupNode(Node node)
Determines if the given node is a group node. |
boolean |
isNormalEdge(Edge e)
Determines if the given Edge is a normal edge, i.e. whether it does not cross any group node boundaries. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Grouping(LayoutGraph graph)
Method Detail |
protected void init()
public LayoutGraph getLayoutGraph()
protected NodeMap createInfoMap(LayoutGraph graph)
protected void disposeInfoMap(LayoutGraph graph, NodeMap infoMap)
public Node getParent(Node node)
null
if the node
is at the top of the hierarchy
public Node getRoot()
public NodeList getChildren(Node parent)
public NodeList getDescendants(Node parent)
public boolean isGroupNode(Node node)
public boolean isNormalEdge(Edge e)
public EdgeList getEdgesGoingIn(Node groupNode)
public EdgeList getEdgesGoingOut(Node groupNode)
public Node getRepresentative(Node node, Node inGroup)
public void dispose()
public static boolean isGrouped(Graph graph)
GroupingKeys.GROUP_DPKEY
,
GroupingKeys.NODE_ID_DPKEY
and GroupingKeys.PARENT_NODE_ID_DPKEY
are registered.
An instance of this class requires its graph to be grouped.
public static boolean isFlat(Graph graph)
|
© Copyright 2000-2003, yWorks GmbH. All rights reserved. 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |