| Package | com.yworks.yfiles.base |
| Class | public class Graph |
| Inheritance | Graph YObject Object |
| Implements | GraphInterface |
| Subclasses | LayoutGraph |
See also
| Property | Defined By | ||
|---|---|---|---|
| dataProviderKeys : Vector.<Object> [read-only]
Returns an array of all data provider look-up keys that are registered with this graph. | Graph | ||
| empty : Boolean [read-only]
Returns true if this graph contains no nodes. | Graph | ||
| graphCopyFactory : GraphCopier_CopyFactory
Specifies the copy factory that is associated with this instance. | Graph | ||
| graphListeners : Iterator [read-only]
Returns an iterator that grants access to all registered graph listeners. | Graph | ||
| registeredEdgeMaps : Vector.<Object> [read-only]
Returns all edge maps that have been created by this graph but have not yet been disposed. | Graph | ||
| registeredNodeMaps : Vector.<Object> [read-only]
Returns all node maps that have been created by this graph but have not yet been disposed. | Graph | ||
| Method | Defined By | ||
|---|---|---|---|
Graph(init:Boolean = true)
Instantiates an empty Graph object. | Graph | ||
addDataProvider(providerKey:Object, data:DataProvider):void
Registers the given data provider using the given look-up key. | Graph | ||
addGraphListener(listener:GraphListener):void
Registers the given graph listener with this graph. | Graph | ||
Redefines an edge's end points and fires corresponding notification events to inform registered listeners. | Graph | ||
clear():void
Removes all nodes and edges from this graph and fires corresponding notification events to inform registered listeners. | Graph | ||
containsEdge(e:Edge):Boolean
Whether or not this graph contains the given edge. | Graph | ||
Returns whether or not this graph contains an edge that connects the given nodes. | Graph | ||
containsNode(v:Node):Boolean
Whether or not this graph contains the given node. | Graph | ||
Creates a copy of this graph. | Graph | ||
Creates a new edge in this graph and fires a corresponding notification event to inform registered listeners. | Graph | ||
Creates a new edge in this graph to be ordered before or after a given edge and fires a corresponding notification event to inform registered listeners. | Graph | ||
Returns a newly created edge map that is valid for the edges in this graph. | Graph | ||
Creates an empty base object of the same type as this graph. | Graph | ||
Creates a new node in this graph and fires a corresponding notification event to inform registered listeners. | Graph | ||
Returns a newly created node map that is valid for the nodes in this graph. | Graph | ||
disposeEdgeMap(map:EdgeMap):void
Informs the graph that the given edge map is no longer needed. | Graph | ||
disposeNodeMap(map:NodeMap):void
Informs the graph that the given node map is no longer needed. | Graph | ||
E():int
Returns the number of edges in this graph. | Graph | ||
edgeCount():int
Returns the number of edges in this graph. | Graph | ||
Returns an iterator that provides access to all edges residing in this graph. | Graph | ||
Provides access to the edges of the graph. | Graph | ||
![]() | equals(o:Object):Boolean | YObject | |
firePostEvent():void
Propagates a so-called POST event to all registered graph listeners. | Graph | ||
firePostEventWithId(id:Object):void
Like firePostEvent(). | Graph | ||
firePreEvent():void
Propagates a so-called PRE event to all registered graph listeners. | Graph | ||
firePreEventWithId(id:Object):void
Like firePreEvent(). | Graph | ||
Returns the first edge in this graph. | Graph | ||
Returns the first node in this graph. | Graph | ||
getClass():Class [override] | Graph | ||
getDataProvider(providerKey:Object):DataProvider
Returns the data provider that is registered with the graph using the given look-up key. | Graph | ||
getEdgeArray():Vector.<Object>
Returns an array containing all edges of this graph. | Graph | ||
getNodeArray():Vector.<Object>
Returns an array containing all nodes of this graph. | Graph | ||
getSource(edge:Object):Object
Returns the source node associated with the given edge. | Graph | ||
getTarget(edge:Object):Object
Returns the target node associated with the given edge. | Graph | ||
![]() | hashCode():int | YObject | |
Hides the given edge from this graph. | Graph | ||
Hides the given node from this graph. | Graph | ||
Returns the last edge in this graph. | Graph | ||
Returns the last node in this graph. | Graph | ||
Redefines an edge's end points and fires corresponding notification events to inform registered listeners. | Graph | ||
moveEdgeTo(e:Edge, newSource:Node, sourceReference:Edge, sourceD:int, newTarget:Node, targetReference:Edge, targetD:int):void
Redefines an edge's end points and fires corresponding notification events to inform registered listeners. | Graph | ||
moveEdgeToFirst(e:Edge):void
Moves the given edge to the first position within the sequence of edges in this graph. | Graph | ||
moveEdgeToLast(e:Edge):void
Moves the given edge to the last position within the sequence of edges in this graph. | Graph | ||
moveNodeToFirst(v:Node):void
Moves the given node to the first position within the sequence of nodes in this graph. | Graph | ||
moveNodeToLast(v:Node):void
Moves the given node to the last position within the sequence of nodes in this graph. | Graph | ||
Moves an induced subgraph to another graph. | Graph | ||
N():int
Returns the number of nodes in this graph. | Graph | ||
[static]
Instantiates an empty Graph object. | Graph | ||
[static]
Instantiates a new Graph object as a copy of the given graph. | Graph | ||
[static]
Instantiates a new Graph object as a partial copy of the given graph. | Graph | ||
nodeCount():int
Returns the number of nodes in this graph. | Graph | ||
Returns an iterator that provides access to all nodes residing in this graph. | Graph | ||
Provides access to the nodes of the graph. | Graph | ||
printNodeSlotSize():void
For internal debugging purposes only. | Graph | ||
reInsertEdge(e:Edge):void
Reinserts a formerly removed edge into this graph and fires a corresponding notification event to inform registered listeners. | Graph | ||
reInsertNode(v:Node):void
Reinserts a formerly removed node into this graph and fires a corresponding notification event to inform registered listeners. | Graph | ||
removeDataProvider(providerKey:Object):void
Removes the data provider that is registered using the given look-up key. | Graph | ||
removeEdge(e:Edge):void
Removes the given edge from this graph and fires a corresponding notification event to inform registered listeners. | Graph | ||
removeGraphListener(listener:GraphListener):void
Removes the given graph listener from this graph. | Graph | ||
removeNode(v:Node):void
Removes the given node from this graph. | Graph | ||
reverseEdge(e:Edge):void
Reverses the given edge and fires corresponding notification events to inform registered listeners. | Graph | ||
Sorts incoming and outgoing edges at each node of the graph. | Graph | ||
sortEdges2(comp:Comparator):void
Sorts the internally held list of edges. | Graph | ||
sortNodes(comp:Comparator):void
Sorts the internally held list of nodes. | Graph | ||
toString():String
Returns a String representation of this graph. | Graph | ||
unhideEdge(e:Edge):void
Unhides the given edge in this graph. | Graph | ||
unhideNode(v:Node):void
Unhides the given node in this graph. | Graph | ||
| Method | Defined By | ||
|---|---|---|---|
Factory method that is called by graphCopyFactory to create a (possibly shared) instance. | Graph | ||
fireGraphEvent(e:GraphEvent):void
Propagates the given graph event to all registered graph listeners. | Graph | ||
[static]
Low-level iteration support for adjacent edges. | Graph | ||
hasListeners():Boolean
Determines whether there are listeners registered with this instance. | Graph | ||
initGraph1():void
Initializes this object. | Graph | ||
initGraph2(argGraph:Graph):void
Initializes this object. | Graph | ||
Initializes this object. | Graph | ||
| Constant | Defined By | ||
|---|---|---|---|
| AFTER : int = 0 [static]
Object insertion specifier. | Graph | ||
| BEFORE : int = 1 [static]
Object insertion specifier. | Graph | ||
| dataProviderKeys | property |
dataProviderKeys:Vector.<Object> [read-only] Returns an array of all data provider look-up keys that are registered with this graph.
public function get dataProviderKeys():Vector.<Object>| empty | property |
empty:Boolean [read-only]
Returns true if this graph contains no nodes.
public function get empty():Boolean| graphCopyFactory | property |
graphCopyFactory:GraphCopier_CopyFactorySpecifies the copy factory that is associated with this instance. The factory should be used by software that wants to create copies of this graph instance if it is in need of a factory. If no factory has been set, this method will initialize this instance's factory using factory method createGraphCopyFactory().
public function get graphCopyFactory():GraphCopier_CopyFactory public function set graphCopyFactory(value:GraphCopier_CopyFactory):voidSee also
| graphListeners | property |
graphListeners:Iterator [read-only] Returns an iterator that grants access to all registered graph listeners.
public function get graphListeners():Iterator| registeredEdgeMaps | property |
registeredEdgeMaps:Vector.<Object> [read-only] Returns all edge maps that have been created by this graph but have not yet been disposed.
public function get registeredEdgeMaps():Vector.<Object>See also
| registeredNodeMaps | property |
registeredNodeMaps:Vector.<Object> [read-only] Returns all node maps that have been created by this graph but have not yet been disposed.
public function get registeredNodeMaps():Vector.<Object>See also
| Graph | () | Constructor |
public function Graph(init:Boolean = true)Instantiates an empty Graph object.
Parametersinit: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.
|
| addDataProvider | () | method |
public function addDataProvider(providerKey:Object, data:DataProvider):voidRegisters the given data provider using the given look-up key. If there is already a data provider registered with that key, then it will be overwritten with the new one.
Parameters
providerKey:Object | |
data:DataProvider |
| addGraphListener | () | method |
public function addGraphListener(listener:GraphListener):voidRegisters the given graph listener with this graph. The listener will receive graph events that signal structural changes occurring within this graph.
Parameters
listener:GraphListener |
See also
| changeEdgeTo | () | method |
public function changeEdgeTo(e:Edge, e1:Edge, e2:Edge, d1:int, d2:int):void
Redefines an edge's end points and fires corresponding notification events to inform registered listeners.
Edge e has source node v := e1.source() and target node w := e2.target(). Edge e is inserted in such a way that an iteration over the edges at v returns e
e1, if d1 == AFTER e1, if d1 == BEFORE, w returns e e2, if d2 == AFTER e2, if d2 == BEFORE. Precondition Edges e, e1, and e2 must belong to this graph.
Parameters
e:Edge — The edge to be changed.
| |
e1:Edge — Reference edge for insertion at a new source node.
| |
e2:Edge — Reference edge for insertion at a new target node.
| |
d1:int — One of the object insertion specifiers BEFORE or AFTER .
| |
d2:int — One of the object insertion specifiers BEFORE or AFTER .
|
See also
| clear | () | method |
public function clear():voidRemoves all nodes and edges from this graph and fires corresponding notification events to inform registered listeners.
| containsEdge | () | method |
public function containsEdge(e:Edge):BooleanWhether or not this graph contains the given edge.
Parameters
e:Edge |
Boolean |
| containsEdgeBetweenNodes | () | method |
public function containsEdgeBetweenNodes(source:Node, target:Node):BooleanReturns whether or not this graph contains an edge that connects the given nodes.
Parameters
source:Node — The source node.
| |
target:Node — The target node.
|
Boolean |
See also
| containsNode | () | method |
public function containsNode(v:Node):BooleanWhether or not this graph contains the given node.
Parameters
v:Node |
Boolean |
| createCopy | () | method |
public function createCopy():GraphCreates a copy of this graph. Invokes 2() .
ReturnsGraph — The newly created Graph object.
|
See also
| createEdge | () | method |
public function createEdge(v:Node, w:Node):Edge
Creates a new edge in this graph and fires a corresponding notification event to inform registered listeners.
The new edge has source node v and target node w, i.e., would be written as edge e = (v, w).
Parameters
v:Node — The source node of the edge.
| |
w:Node — The target node of the edge.
|
Edge — The newly created Edge object.
|
| createEdgeAt | () | method |
public function createEdgeAt(v:Node, e1:Edge, w:Node, e2:Edge, d1:int, d2:int):Edge
Creates a new edge in this graph to be ordered before or after a given edge and fires a corresponding notification event to inform registered listeners.
The new edge e has source node v and target node w, i.e., would be written as edge e = (v, w). Edge e is inserted in such a way that an iteration over the edges at node v returns e
e1, if d1 == AFTER e1, if d1 == BEFORE, w returns e e2, if d2 == AFTER e2, if d2 == BEFORE. Precondition Edge e1 must have source node v and edge e2 must have target node w.
Parameters
v:Node — The source node of the edge.
| |
e1:Edge — An edge with source node v.
| |
w:Node — The target node of the edge.
| |
e2:Edge — An edge with target node w.
| |
d1:int — One of the object insertion specifiers BEFORE or AFTER .
| |
d2:int — One of the object insertion specifiers BEFORE or AFTER .
|
Edge — The newly created Edge object.
|
See also
| createEdgeMap | () | method |
public function createEdgeMap():EdgeMapReturns a newly created edge map that is valid for the edges in this graph. The implementation returned by this method can be used for any edge that is part of this Graph instance at any point of time, i.e., it is safe to modify the graph structure (add and remove nodes and edges) freely.
The implementation returned usesO(m) memory at all times and provides true O(1) read and write access for each edge. In order to release the resources held by this map, disposeEdgeMap() has to be called.
ReturnsEdgeMap |
See also
| createGraph | () | method |
public function createGraph():GraphCreates an empty base object of the same type as this graph.
Subclasses should override this method. ReturnsGraph |
| createGraphCopyFactory | () | method |
protected function createGraphCopyFactory():GraphCopier_CopyFactoryFactory method that is called by graphCopyFactory to create a (possibly shared) instance.
ReturnsGraphCopier_CopyFactory — the (possibly shared) instance.
|
See also
| createNode | () | method |
public function createNode():NodeCreates a new node in this graph and fires a corresponding notification event to inform registered listeners.
ReturnsNode — The newly created Node object.
|
| createNodeMap | () | method |
public function createNodeMap():NodeMapReturns a newly created node map that is valid for the nodes in this graph. The implementation returned by this method can be used for any node that is part of this Graph instance at any point of time, i.e., it is safe to modify the graph structure (add and remove nodes and edges) freely.
The implementation returned usesO(n) memory at all times and provides true O(1) read and write access for each node. In order to release the resources held by this map, disposeNodeMap() has to be called.
ReturnsNodeMap |
See also
| disposeEdgeMap | () | method |
public function disposeEdgeMap(map:EdgeMap):voidInforms the graph that the given edge map is no longer needed. This method is used for EdgeMap implementations that have been obtained using the createEdgeMap() factory method.
Calling this method will destroy the edge map and associated resources can be freed. It is strongly recommended to dispose of all edge maps that are not needed anymore using this method.Parameters
map:EdgeMap |
See also
| disposeNodeMap | () | method |
public function disposeNodeMap(map:NodeMap):voidInforms the graph that the given node map is no longer needed. This method is used for NodeMap implementations that have been obtained using the createNodeMap() factory method.
Calling this method will destroy the node map and associated resources can be freed. It is strongly recommended to dispose of all node maps that are not needed anymore using this method.Parameters
map:NodeMap |
See also
| E | () | method |
public function E():intReturns the number of edges in this graph. Same as edgeCount().
Returnsint — the number of edges in this graph.
|
See also
| edgeCount | () | method |
public function edgeCount():intReturns the number of edges in this graph.
Returnsint — the number of edges in this graph.
|
| edgeObjects | () | method |
public function edgeObjects():IteratorReturns an iterator that provides access to all edges residing in this graph.
ReturnsIterator |
| edges | () | method |
public function edges():EdgeCursorProvides access to the edges of the graph.
ReturnsEdgeCursor — An EdgeCursor to iterate over the edges in the graph.
|
| fireGraphEvent | () | method |
protected function fireGraphEvent(e:GraphEvent):voidPropagates the given graph event to all registered graph listeners.
Parameters
e:GraphEvent |
| firePostEvent | () | method |
public function firePostEvent():voidPropagates a so-called POST event to all registered graph listeners. This method should only be used if a corresponding call to firePreEvent() was made.
Generally, PRE and POST events serve as a means to bracket a sequence of graph events.See also
| firePostEventWithId | () | method |
public function firePostEventWithId(id:Object):voidLike firePostEvent(). Additionally, an event ID may be specified.
Parameters
id:Object — An identifying tag for the event.
|
See also
| firePreEvent | () | method |
public function firePreEvent():voidPropagates a so-called PRE event to all registered graph listeners. This method should only be used if a corresponding call to firePostEvent() follows.
Generally, PRE and POST events serve as a means to bracket a sequence of graph events.See also
| firePreEventWithId | () | method |
public function firePreEventWithId(id:Object):voidLike firePreEvent(). Additionally, an event ID may be specified.
Parameters
id:Object — An identifying tag for the event.
|
See also
| firstEdge | () | method |
public function firstEdge():EdgeReturns the first edge in this graph.
Precondition edgeCount() > 0
Edge |
| firstNode | () | method |
public function firstNode():NodeReturns the first node in this graph.
Precondition !isEmpty()
Node |
| firstOutEdge | () | method |
protected static function firstOutEdge(v:Node):EdgeLow-level iteration support for adjacent edges.
Parameters
v:Node |
Edge |
| getClass | () | method |
override public function getClass():ClassReturnsClass |
| getDataProvider | () | method |
public function getDataProvider(providerKey:Object):DataProviderReturns the data provider that is registered with the graph using the given look-up key. The look-up domain of a returned data provider normally consists of either the nodes of the graph, or its edges, or both.
Parameters
providerKey:Object |
DataProvider |
| getEdgeArray | () | method |
public function getEdgeArray():Vector.<Object>Returns an array containing all edges of this graph.
ReturnsVector.<Object> |
| getNodeArray | () | method |
public function getNodeArray():Vector.<Object>Returns an array containing all nodes of this graph.
ReturnsVector.<Object> |
| getSource | () | method |
public function getSource(edge:Object):ObjectReturns the source node associated with the given edge.
Parameters
edge:Object |
Object |
| getTarget | () | method |
public function getTarget(edge:Object):ObjectReturns the target node associated with the given edge.
Parameters
edge:Object |
Object |
| hasListeners | () | method |
protected function hasListeners():BooleanDetermines whether there are listeners registered with this instance.
ReturnsBoolean |
| hideEdge | () | method |
public function hideEdge(e:Edge):voidHides the given edge from this graph. Hiding an edge means to (temporarily) remove the edge from the graph.
The only difference to a proper edge removal as performed by removeEdge() is that no com.yworks.yfiles.base.GraphEvent will be emitted that signals the structural change (i.e. the edge's removal). Generally, hiding should only be used in the sense of temporarily removing an object that will be reinserted shortly after. To reinsert a hidden edge use unhideEdge() .Parameters
e:Edge |
See also
| hideNode | () | method |
public function hideNode(v:Node):voidHides the given node from this graph. Hiding a node means to (temporarily) remove the node from the graph.
The only difference to a proper node removal as performed by removeNode() is that no com.yworks.yfiles.base.GraphEvent will be emitted that signals the structural change (i.e. the node's removal). Generally, hiding should only be used in the sense of temporarily removing an object that will be reinserted shortly after. To reinsert a hidden node use unhideNode() .Parameters
v:Node |
See also
| initGraph1 | () | method |
protected final function initGraph1():void
Initializes this object. See the documentation of the corresponding factory method newGraph1() for details.
See also
| initGraph2 | () | method |
protected final function initGraph2(argGraph:Graph):void
Initializes this object. See the documentation of the corresponding factory method newGraph2() for details.
Parameters
argGraph:Graph |
See also
| initGraph3 | () | method |
protected final function initGraph3(graph:Graph, subNodes:YCursor):void
Initializes this object. See the documentation of the corresponding factory method newGraph3() for details.
Parameters
graph:Graph | |
subNodes:YCursor |
See also
| lastEdge | () | method |
public function lastEdge():EdgeReturns the last edge in this graph.
Precondition edgeCount() > 0
Edge |
| lastNode | () | method |
public function lastNode():NodeReturns the last node in this graph.
Precondition !isEmpty()
Node |
| moveEdge | () | method |
public function moveEdge(e:Edge, newSource:Node, newTarget:Node):voidRedefines an edge's end points and fires corresponding notification events to inform registered listeners.
The edge is appended to the lists of incoming and outgoing edges at the given source node and target node, respectively.Precondition newSource and newTarget must belong to this graph.
Parameters
e:Edge — The edge to be changed.
| |
newSource:Node — The new source node of the given edge.
| |
newTarget:Node — The new target node of the given edge.
|
| moveEdgeTo | () | method |
public function moveEdgeTo(e:Edge, newSource:Node, sourceReference:Edge, sourceD:int, newTarget:Node, targetReference:Edge, targetD:int):void
Redefines an edge's end points and fires corresponding notification events to inform registered listeners.
Edge e has source node v := sourceReference.source() or v := newSource, if sourceReference == null and target node w := targetReference.target() or w := newTarget, if targetReference == null. Edge e is inserted in such a way that an iteration over the edges at v returns e
sourceReference, if sourceD == AFTER sourceReference, if sourceD == BEFORE, w returns e targetReference, if targetD == AFTER targetReference, if targetD == BEFORE. Precondition Edge e must belong to this graph. Also, either sourceReference or newSource must be non-null and belong to this graph, and either targetReference or newTarget must be non-null and belong to this graph.
Parameters
e:Edge — The edge to be changed.
| |
newSource:Node — The new source node.
| |
sourceReference:Edge — Reference edge for insertion at the new source node.
| |
sourceD:int — One of the object insertion specifiers BEFORE or AFTER .
| |
newTarget:Node — The new target node.
| |
targetReference:Edge — Reference edge for insertion at the new target node.
| |
targetD:int — One of the object insertion specifiers BEFORE or AFTER .
|
See also
| moveEdgeToFirst | () | method |
public function moveEdgeToFirst(e:Edge):voidMoves the given edge to the first position within the sequence of edges in this graph.
Parameters
e:Edge |
| moveEdgeToLast | () | method |
public function moveEdgeToLast(e:Edge):voidMoves the given edge to the last position within the sequence of edges in this graph.
Parameters
e:Edge |
| moveNodeToFirst | () | method |
public function moveNodeToFirst(v:Node):voidMoves the given node to the first position within the sequence of nodes in this graph.
Parameters
v:Node |
| moveNodeToLast | () | method |
public function moveNodeToLast(v:Node):voidMoves the given node to the last position within the sequence of nodes in this graph.
Parameters
v:Node |
| moveSubGraph | () | method |
public function moveSubGraph(subNodes:NodeList, targetGraph:Graph):EdgeListMoves an induced subgraph to another graph.
Precondition The nodes in subNodes must belong to this graph.
Parameters
subNodes:NodeList — A list of nodes that induce the subgraph to be moved.
| |
targetGraph:Graph — The graph where the subgraph is moved to.
|
EdgeList — A list of removed edges that connected the induced subgraph to this graph.
|
| N | () | method |
public function N():intReturns the number of nodes in this graph. Same as nodeCount().
Returnsint — the number of nodes in this graph.
|
See also
| newGraph1 | () | method |
| newGraph2 | () | method |
public static function newGraph2(argGraph:Graph):Graph
Instantiates a new Graph object as a copy of the given graph.
Values bound to the argument graph via node and edge keys are available in the new Graph instance with the keys registered with argGraph. Only references to these values are copied.
Parameters
argGraph:Graph — The graph to be copied.
|
Graph |
See also
| newGraph3 | () | method |
public static function newGraph3(graph:Graph, subNodes:YCursor):Graph
Instantiates a new Graph object as a partial copy of the given graph.
Only the subgraph induced by the given cursor will be copied to the new Graph instance. Values bound to the argument graph via node and edge keys are available in the new Graph instance with the keys registered with graph. Only references to these values are copied.
Parameters
graph:Graph — The graph to be (partially) copied.
| |
subNodes:YCursor — A cursor to iterate over the nodes that actually induce the subgraph to be copied.
|
Graph |
See also
| nodeCount | () | method |
public function nodeCount():intReturns the number of nodes in this graph.
Returnsint — the number of nodes in this graph.
|
| nodeObjects | () | method |
public function nodeObjects():IteratorReturns an iterator that provides access to all nodes residing in this graph.
ReturnsIterator |
| nodes | () | method |
public function nodes():NodeCursorProvides access to the nodes of the graph.
ReturnsNodeCursor — A NodeCursor to iterate over the nodes in the graph.
|
| printNodeSlotSize | () | method |
public function printNodeSlotSize():voidFor internal debugging purposes only.
| reInsertEdge | () | method |
public function reInsertEdge(e:Edge):voidReinserts a formerly removed edge into this graph and fires a corresponding notification event to inform registered listeners.
The reinserted edge is appended to the sequence of edges in this graph, i.e., normally, its new position does not match the position before its removal. The same holds for the edge's positions in the list of incoming and outgoing edges at its source node and target node, respectively.Parameters
e:Edge — The edge to be reinserted.
|
See also
| reInsertNode | () | method |
public function reInsertNode(v:Node):voidReinserts a formerly removed node into this graph and fires a corresponding notification event to inform registered listeners.
The reinserted node is appended to the sequence of nodes in this graph, i.e., normally, its new position does not match the position before its removal.Parameters
v:Node — The node to be reinserted.
|
See also
| removeDataProvider | () | method |
public function removeDataProvider(providerKey:Object):voidRemoves the data provider that is registered using the given look-up key.
Parameters
providerKey:Object |
| removeEdge | () | method |
public function removeEdge(e:Edge):voidRemoves the given edge from this graph and fires a corresponding notification event to inform registered listeners.
The edge will be deselected before it gets removed.Parameters
e:Edge — The edge to be removed.
|
| removeGraphListener | () | method |
public function removeGraphListener(listener:GraphListener):voidRemoves the given graph listener from this graph.
Parameters
listener:GraphListener |
| removeNode | () | method |
public function removeNode(v:Node):voidRemoves the given node from this graph. All edges connecting to the given node are removed as well (preceding the actual node removal). Corresponding notification events are fired to inform registered listeners.
The node will be deselected before it gets removed.Parameters
v:Node — The node to be removed from this graph.
|
| reverseEdge | () | method |
public function reverseEdge(e:Edge):voidReverses the given edge and fires corresponding notification events to inform registered listeners. This operation exchanges source and target node of the edge.
Parameters
e:Edge |
| sortEdges | () | method |
public function sortEdges(inComp:Comparator, outComp:Comparator):void
Sorts incoming and outgoing edges at each node of the graph.
If a given comparator is null, then the corresponding edges (i.e., incoming/outgoing) will not be sorted. This sorts the order of the edges as returned by com.yworks.yfiles.base.Node.outEdges() and com.yworks.yfiles.base.Node.inEdges() respectively.
Parameters
inComp:Comparator — The comparator used for the incoming edges at each node.
| |
outComp:Comparator — The comparator used for the outgoing edges at each node.
|
See also
| sortEdges2 | () | method |
public function sortEdges2(comp:Comparator):void
Sorts the internally held list of edges.
If the given comparator is null, then the edges will not be sorted. This list determines the order of the edges as returned by edges().
Parameters
comp:Comparator — The comparator used for the edges.
|
See also
| sortNodes | () | method |
public function sortNodes(comp:Comparator):void
Sorts the internally held list of nodes.
If the given comparator is null, then the nodes will not be sorted. This list determines the order of the nodes as returned by nodes().
Parameters
comp:Comparator — The comparator used for the nodes.
|
See also
| toString | () | method |
public function toString():StringReturns a String representation of this graph. The result contains the String representations of all nodes followed by the String representations of all edges.
ReturnsString |
| unhideEdge | () | method |
public function unhideEdge(e:Edge):voidUnhides the given edge in this graph. Unhiding an edge means to reinsert an edge that was formerly hidden from this graph by a call to hideEdge() .
The only difference to a proper edge reinsertion as performed by reInsertEdge() is that no com.yworks.yfiles.base.GraphEvent will be emitted that signals the structural change (i.e. the edge's reinsertion).Parameters
e:Edge |
See also
| unhideNode | () | method |
public function unhideNode(v:Node):voidUnhides the given node in this graph. Unhiding a node means to reinsert a node that was formerly hidden from this graph by a call to hideNode() .
The only difference to a proper node reinsertion as performed by reInsertNode() is that no com.yworks.yfiles.base.GraphEvent will be emitted that signals the structural change (i.e. the node's reinsertion).Parameters
v:Node |
See also
| AFTER | Constant |
public static const AFTER:int = 0Object insertion specifier. An object gets inserted after another one.
| BEFORE | Constant |
public static const BEFORE:int = 1Object insertion specifier. An object gets inserted before another one.