Packageorg.un.flex.graphLayout.data
Classpublic class Edge
ImplementsIEdge, mx.core.IDataRenderer

Edge class that implements the IEdge interface an edge has an id, two nodes a potential data object and may be associated with an IVisualEdge

See also

IEdge
INode
Node
IVisualEdge


Public Properties
 PropertyDefined by
  data : Object
Access to the associated data object with this edge, in many cases an XML object is used.
Edge
  fromNode : INode
[read-only] returns the source node (fromNode) of the edge.
Edge
  id : int
[read-only] The id of this edge.
Edge
  isDirectional : Boolean
[read-only] Indicates if the graph that contains this edge is directional.
Edge
  node1 : INode
[read-only] The first node associated with this edge.
Edge
  node2 : INode
[read-only] The second node associated with this edge.
Edge
  toNode : INode
[read-only] returns the target node (toNode) of the edge.
Edge
  vedge : IVisualEdge
Access to the associated VisualEdge of this Edge.
Edge
Public Methods
 MethodDefined by
  
Edge(graph:IGraph, ve:IVisualEdge, id:int, node1:INode, node2:INode, data:Object)
constructor for an Edge
Edge
  
This method returns the other node than the node given as parameter, so it can be used to follow along the edge.
Edge
Property detail
dataproperty
data:Object  [read-write]

Access to the associated data object with this edge, in many cases an XML object is used.

Implementation
    public function get data():Object
    public function set data(value:Object):void

See also

Object
XML
fromNodeproperty 
fromNode:INode  [read-only]

returns the source node (fromNode) of the edge. Only available if the graph is directional as otherwise there is no designated source node.

Implementation
    public function get fromNode():INode
idproperty 
id:int  [read-only]

The id of this edge.

Implementation
    public function get id():int
isDirectionalproperty 
isDirectional:Boolean  [read-only]

Indicates if the graph that contains this edge is directional.

Implementation
    public function get isDirectional():Boolean
node1property 
node1:INode  [read-only]

The first node associated with this edge.

Implementation
    public function get node1():INode
node2property 
node2:INode  [read-only]

The second node associated with this edge.

Implementation
    public function get node2():INode
toNodeproperty 
toNode:INode  [read-only]

returns the target node (toNode) of the edge. Only available if the graph is directional as otherwise there is no designated target node.

Implementation
    public function get toNode():INode
vedgeproperty 
vedge:IVisualEdge  [read-write]

Access to the associated VisualEdge of this Edge.

Implementation
    public function get vedge():IVisualEdge
    public function set vedge(value:IVisualEdge):void
Constructor detail
Edge()constructor
public function Edge(graph:IGraph, ve:IVisualEdge, id:int, node1:INode, node2:INode, data:Object)

constructor for an Edge

Parameters
graph:IGraph — The graph that this edge is part of
 
ve:IVisualEdge — The VisualEdge that this Edge may be associated with
 
id:int — The internal id of this new edge
 
node1:INode — The first node (or fromNode) of this edge
 
node2:INode — The second node (or toNode) of this edge
 
data:Object — The potentially associated data object, typically an XML object
Method detail
othernode()method
public function othernode(node:INode):INode

This method returns the other node than the node given as parameter, so it can be used to follow along the edge.

Parameters
node:INode — The node that is known (implicit source node)

Returns
INode — The node that is unknown (implicit target node)