Package | com.yworks.yfiles.util |
Class | public class GraphPartitionManager |
Inheritance | GraphPartitionManager YObject Object |
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.
Note that this class should not be used to hide elements from a Graph2D for pure hiding purposes. Since this class will by default prevent the graph instance from firing events, other code might cease to work correctly. Use this class for short term removal of nodes and edges, only.
Property | Defined By | ||
---|---|---|---|
fireGraphEventsEnabled : Boolean
Getter:
Returns whether or not this partition manager should fire graph events. | GraphPartitionManager | ||
graph : Graph [read-only]
Returns the Graph for which this partition manager was created. | GraphPartitionManager |
Method | Defined By | ||
---|---|---|---|
Instantiates a new GraphPartitionManager for the given graph. | GraphPartitionManager | ||
displayPartition(partitionId:Object):void
Assures that only nodes are visible in the graph that are associated with the given partitionId. | GraphPartitionManager | ||
equals(o:Object):Boolean | YObject | ||
getClass():Class [override] | GraphPartitionManager | ||
hashCode():int | YObject | ||
hideAll():void
Hides all nodes and edges from this graph. | GraphPartitionManager | ||
Hides the given edge from the graph. | GraphPartitionManager | ||
hideEdges():void
Hides all edges from this graph. | GraphPartitionManager | ||
hideEdgesFromCursor(ec:EdgeCursor):void
Hides the given edges from the graph. | GraphPartitionManager | ||
hideEdgesFromList(el:EdgeList):void
Hides the given list of edges from the graph. | GraphPartitionManager | ||
hideGraphItems(cursor:YCursor):void
Hides the given elements from the graph. | GraphPartitionManager | ||
hideMultipleEdges():void
Hides multiple edges from the graph. | GraphPartitionManager | ||
Hides the given node and all it's adjacent edges from the graph. | GraphPartitionManager | ||
Hides the given list of nodes from the graph. | GraphPartitionManager | ||
hideNodes2(nc:NodeCursor):void
Hides the given nodes from the graph. | GraphPartitionManager | ||
hidePartition(partitionId:Object):void
Hides nodes and adjacent edges that have the given partitionId associated. | GraphPartitionManager | ||
hideSelfLoops():void
Hides all self-loop edges from this graph. | GraphPartitionManager | ||
initPartitions(partitionId:DataProvider):void
Initializes internal data structures using the new DataProvider. | GraphPartitionManager | ||
[static]
Instantiates a new GraphPartitionManager for the given graph. | GraphPartitionManager | ||
simplifyGraph():void
Hides all self-loops and multiple edges from the graph. | GraphPartitionManager | ||
unhideAll():void
Unhides all formerly hidden elements in the graph. | GraphPartitionManager | ||
unhideEdges():void
Unhides all formerly hidden edges in the graph. | GraphPartitionManager | ||
unhideNodes():void
Unhides all formerly hidden nodes in the graph. | GraphPartitionManager | ||
unhidePartition(partitionId:Object):void
Unhides nodes that have the given partitionId associated. | GraphPartitionManager |
Method | Defined By | ||
---|---|---|---|
Initializes this object. | GraphPartitionManager | ||
unhideEdge(e:Edge):void
This method will be called whenever the partition manager is requested to unhide the given edge from the graph. | GraphPartitionManager | ||
unhideNode(v:Node):void
This method will be called whenever the partition manager is requested to unhide the given node from the graph. | GraphPartitionManager |
fireGraphEventsEnabled | property |
fireGraphEventsEnabled:Boolean
Getter: Returns whether or not this partition manager should fire graph events.
Setter: Specifies whether or not this partition manager should fire graph events when adding or removing items from the graph. By default the partition manager does not fire graph events. public function get fireGraphEventsEnabled():Boolean
public function set fireGraphEventsEnabled(value:Boolean):void
graph | property |
graph:Graph
[read-only]
Returns the Graph
for which this partition manager was created.
public function get graph():Graph
GraphPartitionManager | () | Constructor |
public function GraphPartitionManager(graph:Graph, partitionId:DataProvider, init:Boolean = true)
Instantiates a new GraphPartitionManager for the given graph. All non-static hiding and unhiding methods will refer to the given graph.
Parametersgraph:Graph | |
partitionId:DataProvider | |
init:Boolean (default = true ) — An internally used switch to help handle proper instance initialization in inheritance chains where classes can have multiple constructor-like factory methods.
This parameter can safely be ignored/omitted when calling the constructor.
|
displayPartition | () | method |
public function displayPartition(partitionId:Object):void
Assures that only nodes are visible in the graph that are associated with the given partitionId.
Parameters
partitionId:Object — the partitionId for the nodes that will be made visible
|
getClass | () | method |
override public function getClass():Class
ReturnsClass |
hideAll | () | method |
public function hideAll():void
Hides all nodes and edges from this graph. The hidden elements will be stored so that they can be unhidden again at a later time.
hideEdge | () | method |
public function hideEdge(e:Edge):void
Hides the given edge from the graph. The hidden edge will be stored so that they can be unhidden again at a later time.
Parameters
e:Edge |
hideEdges | () | method |
public function hideEdges():void
Hides all edges from this graph. The hidden edges will be stored so that they can be unhidden again at a later time.
hideEdgesFromCursor | () | method |
public function hideEdgesFromCursor(ec:EdgeCursor):void
Hides the given edges from the graph. The hidden edges will be stored so that they can be unhidden again at a later time.
Parameters
ec:EdgeCursor |
hideEdgesFromList | () | method |
public function hideEdgesFromList(el:EdgeList):void
Hides the given list of edges from the graph. The hidden edges will be stored so that they can be unhidden again at a later time.
Parameters
el:EdgeList |
hideGraphItems | () | method |
public function hideGraphItems(cursor:YCursor):void
Hides the given elements from the graph. The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time.
Parameters
cursor:YCursor |
hideMultipleEdges | () | method |
public function hideMultipleEdges():void
Hides multiple edges from the graph. If there are multiple edges connecting two nodes then all but one (representative) of these edges will be hidden. The hidden edges will be stored so that they can be unhidden again at a later time.
hideNode | () | method |
public function hideNode(v:Node):void
Hides the given node and all it's adjacent edges from the graph. The hidden elements will be stored so that they can be unhidden again at a later time.
Parameters
v:Node |
hideNodes | () | method |
public function hideNodes(nl:NodeList):void
Hides the given list of nodes from the graph. The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time.
Parameters
nl:NodeList |
hideNodes2 | () | method |
public function hideNodes2(nc:NodeCursor):void
Hides the given nodes from the graph. The hidden nodes and adjacent edges will be stored so that they can be unhidden again at a later time.
Parameters
nc:NodeCursor |
hidePartition | () | method |
public function hidePartition(partitionId:Object):void
Hides nodes and adjacent edges that have the given partitionId associated.
Parameters
partitionId:Object — the id
|
hideSelfLoops | () | method |
public function hideSelfLoops():void
Hides all self-loop edges from this graph. The hidden edges will be stored so that they can be unhidden again at a later time.
initGraphPartitionManager | () | method |
protected final function initGraphPartitionManager(graph:Graph, partitionId:DataProvider):void
Initializes this object. See the documentation of the corresponding factory method newGraphPartitionManager()
for details.
Parameters
graph:Graph | |
partitionId:DataProvider |
See also
initPartitions | () | method |
public function initPartitions(partitionId:DataProvider):void
Initializes internal data structures using the new DataProvider. This method must also be called whenever the content of the given DataProvider changes.
Parameters
partitionId:DataProvider — the data provider that holds the partitionIds for all elements.
|
newGraphPartitionManager | () | method |
public static function newGraphPartitionManager(graph:Graph, partitionId:DataProvider):GraphPartitionManager
Instantiates a new GraphPartitionManager for the given graph. All non-static hiding and unhiding methods will refer to the given graph.
Parameters
graph:Graph | |
partitionId:DataProvider |
GraphPartitionManager |
simplifyGraph | () | method |
public function simplifyGraph():void
Hides all self-loops and multiple edges from the graph.
The overall effect of this method is that the minimum number of edges are hidden from the graph such that it contains no self-loops and no multiple edges anymore. The hidden edges will be stored so that they can be unhidden again at a later time.unhideAll | () | method |
public function unhideAll():void
Unhides all formerly hidden elements in the graph.
unhideEdge | () | method |
protected function unhideEdge(e:Edge):void
This method will be called whenever the partition manager is requested to unhide the given edge from the graph.
Parameters
e:Edge |
unhideEdges | () | method |
public function unhideEdges():void
Unhides all formerly hidden edges in the graph.
Precondition Both source or target node of all such edges must be contained in the graph.
unhideNode | () | method |
protected function unhideNode(v:Node):void
This method will be called whenever the partition manager is requested to unhide the given node from the graph.
Parameters
v:Node |
unhideNodes | () | method |
public function unhideNodes():void
Unhides all formerly hidden nodes in the graph. Note that this method does not unhide hidden edges.
unhidePartition | () | method |
public function unhidePartition(partitionId:Object):void
Unhides nodes that have the given partitionId associated.
Parameters
partitionId:Object — the id
|