Packageorg.un.flex.graphLayout.data
Classpublic class Node
ImplementsINode, mx.core.IDataRenderer

Implements the Node data structure, which is part of a graph. Nodes can be connected via directional or non-directional edges. A node has an id, a String id and may be associated with a visual node.



Public Properties
 PropertyDefined by
  data : Object
Node
  id : int
[read-only] Access to the id property of any item.
Node
  inEdges : Array
[read-only] The Array containing all incoming edges of this node.
Node
  outEdges : Array
[read-only] The Array containing all outgoing edges of this node.
Node
  predecessors : Array
[read-only] The Array containing all preceding nodes, i.e.
Node
  stringid : String
[read-only] Access to the string id of a node
Node
  successors : Array
[read-only] The Array containing all succeeding nodes, i.e.
Node
  vnode : IVisualNode
Access to the associated VisualNode object of this data node
Node
Public Methods
 MethodDefined by
  
Node(id:int, sid:String, vn:IVisualNode, o:Object)
The constructor assigns the two ids and may also be used to associate a VisualNode and/or a data object.
Node
  
addInEdge(e:IEdge):void
Registers an incoming edge with this node.
Node
  
addOutEdge(e:IEdge):void
Registers an outgoing edge with this node.
Node
  
Removes an edge from the list of incoming edges of this node.
Node
  
Removes an edge from the list of outgiong edges of this node.
Node
Property detail
dataproperty
data:Object  [read-write]

Implementation
    public function get data():Object
    public function set data(value:Object):void
idproperty 
id:int  [read-only]

Access to the id property of any item.

Implementation
    public function get id():int
inEdgesproperty 
inEdges:Array  [read-only]

The Array containing all incoming edges of this node. (In a non-directional graph, this is the same as the outgoing edges.)

Implementation
    public function get inEdges():Array
outEdgesproperty 
outEdges:Array  [read-only]

The Array containing all outgoing edges of this node. (In a non-directional graph, this is the same as the incoming edges.)

Implementation
    public function get outEdges():Array
predecessorsproperty 
predecessors:Array  [read-only]

The Array containing all preceding nodes, i.e. nodes that are at the other end of an outgoing edge. (In a non-directional graph this is the same as the successor nodes).

Implementation
    public function get predecessors():Array
stringidproperty 
stringid:String  [read-only]

Access to the string id of a node

Implementation
    public function get stringid():String
successorsproperty 
successors:Array  [read-only]

The Array containing all succeeding nodes, i.e. nodes that are at the other end of an incoming edge. (In a non-directional graph this is the same as the predecessor nodes).

Implementation
    public function get successors():Array
vnodeproperty 
vnode:IVisualNode  [read-write]

Access to the associated VisualNode object of this data node

Implementation
    public function get vnode():IVisualNode
    public function set vnode(value:IVisualNode):void
Constructor detail
Node()constructor
public function Node(id:int, sid:String, vn:IVisualNode, o:Object)

The constructor assigns the two ids and may also be used to associate a VisualNode and/or a data object.

Parameters
id:int — The internal (numeric) id of the node.
 
sid:String — The string id of the node (typically specified in XML).
 
vn:IVisualNode — The associated VisualNode of the node (may be null).
 
o:Object — The associated data object of the node (may be null).
Method detail
addInEdge()method
public function addInEdge(e:IEdge):void

Registers an incoming edge with this node. This method does nothing else, and should normally not be used directly, but is typically used by the link method of the graph.

Parameters
e:IEdge — The edge to add to this node.
addOutEdge()method 
public function addOutEdge(e:IEdge):void

Registers an outgoing edge with this node. This method does nothing else, and should normally not be used directly, but is typically used by the link method of the graph.

Parameters
e:IEdge — The edge to add to this node.
removeInEdge()method 
public function removeInEdge(e:IEdge):void

Removes an edge from the list of incoming edges of this node. Removes also the predecessor node from the list. Should not be used directly, but is typically used by the unlink or removeEdge method of the graph.

Parameters
e:IEdge — The edge to remove to this node.
removeOutEdge()method 
public function removeOutEdge(e:IEdge):void

Removes an edge from the list of outgiong edges of this node. Removes also the successor node from the list. Should not be used directly, but is typically used by the unlink or removeEdge method of the graph.

Parameters
e:IEdge — The edge to remove to this node.