|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--y.util.GraphHider
Provides functionality to hide and unhide nodes and edges of a graph.
This class can be used to temporarily hide away certain elements of a graph and to unhide that parts at a later time again. Instances of this class keep track of graph elements that were hidden from a graph in order to make them visible again at a later time.
Field Summary | |
protected EdgeList |
hiddenEdges
holds the list of the hidden edges in stack order |
protected NodeList |
hiddenNodes
holds the list of the hidden nodes in stack order |
Constructor Summary | |
GraphHider(Graph g)
Instantiates a new GraphHider for the given graph. |
Method Summary | |
Graph |
getGraph()
Getter for property graph. |
void |
hide(Edge e)
Hides the given edge from the graph. |
void |
hide(EdgeCursor ec)
Hides the given edges from the graph. |
void |
hide(EdgeList el)
Hides the given list of edges from the graph. |
void |
hide(Node v)
Hides the given node and all it's adjacent edges from the graph. |
void |
hide(NodeCursor nc)
Hides the given nodes from the graph. |
void |
hide(NodeList nl)
Hides the given list of nodes from the graph. |
void |
hide(YCursor cursor)
Hides the given elements from the graph. |
void |
hideAll()
Hides all nodes and edges from this graph. |
void |
hideEdges()
Hides all edges from this graph. |
void |
hideMultipleEdges()
Hides multiple edges from the graph. |
void |
hideSelfLoops()
Hides all selfloop edges from this graph. |
static void |
hideSubgraph(Graph graph,
EdgeCursor ec)
Hides the subgraph induced by the given edges from the given graph. |
boolean |
isFireGraphEventsEnabled()
Returns whether or not this hider should fire graph events. |
void |
setFireGraphEventsEnabled(boolean fireEvents)
Whether or not this hider should fire graph events when adding or removing items from the graph. |
void |
simplifyGraph()
Hides all selfloops and multiple edges from the graph. |
protected void |
unhide(Edge e)
This method will be called whenever the hider is requested to unhide the given edge from the graph. |
protected void |
unhide(Node v)
This method will be called whenever the hider is requested to unhide the given node from the graph. |
void |
unhideAll()
Unhides all formerly hidden elements in the graph. |
void |
unhideEdges()
Unhides all formerly hidden edges in the graph. |
void |
unhideNodes()
Unhides all formerly hidden nodes in the graph. |
static void |
unhideSubgraph(Graph graph,
EdgeCursor ec)
Unhides the subgraph induced by the given edges in the given graph. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected EdgeList hiddenEdges
protected NodeList hiddenNodes
Constructor Detail |
public GraphHider(Graph g)
Method Detail |
public void setFireGraphEventsEnabled(boolean fireEvents)
public boolean isFireGraphEventsEnabled()
public void hideAll()
public void hideEdges()
public void hideSelfLoops()
public void simplifyGraph()
The overall effect of this method is that the minimum number of edges are hidden from the graph such that it contains no selfloops and no multiple edges anymore. The hidden edges will be stored so that they can be unhidden again at a later time.
public void hideMultipleEdges()
public void unhideAll()
public void unhideNodes()
public void unhideEdges()
Precondition:Both source or target node of all such edges must be contained in the graph.
public void hide(Node v)
public void hide(Edge e)
public void hide(EdgeList el)
public void hide(NodeList nl)
public void hide(EdgeCursor ec)
public void hide(NodeCursor nc)
public void hide(YCursor cursor)
public static void unhideSubgraph(Graph graph, EdgeCursor ec)
Parts of the subgraph that are already contained in the given graph will not be unhidden and pose no problem to this method.
public static void hideSubgraph(Graph graph, EdgeCursor ec)
public Graph getGraph()
protected void unhide(Edge e)
protected void unhide(Node v)
|
© 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 |