public var automaticLayout:Boolean = false
This property can be used as the source for data binding.
edgeContraction:int
[write-only]
Set a new value for the contraction of the edges
Implementation
public function set edgeContraction(value:int):void
public var edgeFactory:IEdgeFactory
public var edges:EdgeList
public var engine:PhysicsEngine
public var nodeFactory:INodeFactory
nodeRepulsion:int
[write-only]
Sets a new value for the repulsion of the nodes.
Implementation
public function set nodeRepulsion(value:int):void
public var nodes:Object
scaling:Number
[write-only]
Sets the scaling for all elements of the graph.
Note: Use this function carefully, it can be very expensive in terms of CPU usage.
Implementation
public function set scaling(value:Number):void
public function Graph()
protected function arrowMouseUpHandler(event:MouseEvent, label:Object = null):void
Called if the mouse button is released on the arrowhead of an edge.
Parameters
| event:MouseEvent — the MouseEvent
|
|
| label:Object (default = null )
|
protected function edgeMouseUpHandler(event:MouseEvent):void
Called if the mouse button is released.
Parameters
| event:MouseEvent — the MouseEvent
|
public function getNode(nid:String):Node
Returns the node for the specified ID or null if no node with
that ID is part of the graph.
Parameters
| nid:String — the ID of the node to return
|
Returns
| Node —
the node or null if no node with the specified ID is part of the graph
|
public function insertNode(nid:String, x:Number, y:Number = 0):Node
Creates a node and inserts it into the graph.
Parameters
| nid:String — the id of the node to insert
|
|
| x:Number |
|
| y:Number (default = 0 )
|
Returns
public function isLinked(fromNode:Node, toNode:Node):Boolean
Parameters
| fromNode:Node — the starting point
|
|
| toNode:Node — the ending point
|
Returns
| Boolean — true, if the graph contains a link from fromNode to toNode
|
protected override function keyDownHandler(event:KeyboardEvent):void
Parameters
public function link(fromNode:Node, toNode:Node, caption:String = null):Edge
Creates an edge that links from one node in the graph to another.
If the nodes are already linked, the function has no effect.
Parameters
| fromNode:Node — the starting point of the edge
|
|
| toNode:Node — the ending point of the edge
|
|
| caption:String (default = null ) — the caption for the edge
|
Returns
| Edge —
the edge that has been added or null
|
protected function mouseDownHandler(event:MouseEvent):void
Called if the user clicks on the background of the graph area (the drawingPane).
Parameters
| event:MouseEvent — the MouseEvent
|
protected function mouseMoveHandler(event:MouseEvent):void
Called if the user moves the mouse with the mouse button held down.
Parameters
| event:MouseEvent — the MouseEvent
|
protected function mouseUpHandler(event:MouseEvent):void
Called if the user releases the mouse button.
Parameters
| event:MouseEvent — the MouseEvent
|
protected function nodeMouseDownHandler(event:MouseEvent):void
Called if the user clicks on a node.
Parameters
| event:MouseEvent — the MouseEvent
|
protected function nodeMouseUpHandler(event:MouseEvent):void
Called if the mouse button is released on a node.
Parameters
| event:MouseEvent — the MouseEvent
|
public function remove(node:Node):void
Removes a node from the graph.
Parameters
| node:Node — the node to be removed
|
public function removeAllNodes():void
Removes all nodes from the graph.
public function unlink(fromNode:Node, toNode:Node):Boolean
Removes an edge from the graph.
Parameters
| fromNode:Node — the starting point of the edge
|
|
| toNode:Node — the ending point of the edge
|
Returns
| Boolean — true, if the edge has been removed, false if the given nodes are not connected
|
protected override function updateDisplayList(unscaledWidth:Number, unscaledHeight:Number):void
Override. Redraws the edges of the graph after the UI has been updated.
Parameters
| unscaledWidth:Number |
|
| unscaledHeight:Number |