Package | twaver.network.layout |
Class | public class SpringLayouter |
Inheritance | SpringLayouter ![]() |
This code shows how to use Spring Layouter:
var springLaouter:SpringLayouter = new SpringLayouter(network); springLaouter.start();
Property | Defined By | ||
---|---|---|---|
linkRepulsionFactor : Number
Get link repulsion factor of this spring layout. | SpringLayouter | ||
network : Network [read-only]
Get network of this layout. | SpringLayouter | ||
nodeRepulsionFactor : Number
Get node repulsion factor of this spring layout. | SpringLayouter | ||
running : Boolean [read-only]
Check whether this spring layout is running now. | SpringLayouter | ||
stepCount : int
Get step count of this spring layout. | SpringLayouter | ||
timerDelay : Number
Get internal timer delay value. | SpringLayouter |
Method | Defined By | ||
---|---|---|---|
SpringLayouter(network:Network)
Constructor. | SpringLayouter | ||
damp():void
Call this to damp graph
| SpringLayouter | ||
getRepulsion(node:Node):Number
Get node repulsion. | SpringLayouter | ||
Check whether specified node is movable in this layout. | SpringLayouter | ||
Check whether specified element is visible. | SpringLayouter | ||
relax():void
Call this will move all nodes one step forward. | SpringLayouter | ||
relaxLink(link:SLink):void
Call this to relax specified link. | SpringLayouter | ||
relaxNodePair(n1:SNode, n2:SNode):void
Relax a node pair. | SpringLayouter | ||
start():void
Call this to start spring layout. | SpringLayouter | ||
stop():void
Call this to stop spring layout. | SpringLayouter |
linkRepulsionFactor | property |
linkRepulsionFactor:Number
Get link repulsion factor of this spring layout. Default value is 0.6
public function get linkRepulsionFactor():Number
public function set linkRepulsionFactor(value:Number):void
network | property |
network:Network
[read-only] Get network of this layout.
public function get network():Network
nodeRepulsionFactor | property |
nodeRepulsionFactor:Number
Get node repulsion factor of this spring layout. Default value is 0.6
public function get nodeRepulsionFactor():Number
public function set nodeRepulsionFactor(value:Number):void
running | property |
running:Boolean
[read-only] Check whether this spring layout is running now.
public function get running():Boolean
stepCount | property |
stepCount:int
Get step count of this spring layout. Default value is 10.
public function get stepCount():int
public function set stepCount(value:int):void
timerDelay | property |
timerDelay:Number
Get internal timer delay value. Default value is 50.
public function get timerDelay():Number
public function set timerDelay(value:Number):void
SpringLayouter | () | Constructor |
public function SpringLayouter(network:Network)
Constructor. Create spring layout for this network.
Parametersnetwork:Network — the network to be layouted.
|
damp | () | method |
public function damp():void
Call this to damp graph
getRepulsion | () | method |
public function getRepulsion(node:Node):Number
Get node repulsion.
Parameters
node:Node — a node to be checked.
|
Number — repulsion value of this node.
|
isMovable | () | method |
public function isMovable(node:Node):Boolean
Check whether specified node is movable in this layout.
Parameters
node:Node — a node to be checked.
|
Boolean — true if movable, false otherwise.
|
isVisible | () | method |
public function isVisible(element:IElement):Boolean
Check whether specified element is visible.
Parameters
element:IElement — element to be checke
|
Boolean — true if visible, fales otherwise.
|
relax | () | method |
public function relax():void
Call this will move all nodes one step forward.
relaxLink | () | method |
public function relaxLink(link:SLink):void
Call this to relax specified link.
Parameters
link:SLink — the link to be relaxed.
|
relaxNodePair | () | method |
public function relaxNodePair(n1:SNode, n2:SNode):void
Relax a node pair.
Parameters
n1:SNode — one node of the pair
| |
n2:SNode — second node of the pair
|
start | () | method |
public function start():void
Call this to start spring layout.
stop | () | method |
public function stop():void
Call this to stop spring layout.