| Package | org.un.flex.graphLayout.layout |
| Class | public class ForceDirectedLayouter |
| Inheritance | ForceDirectedLayouter IterativeBaseLayouter BaseLayouter |
| Implements | ILayoutAlgorithm |
Copyright of the original TouchGraph LLC code: (c) 2001-2002 Alexander Shapiro. All rights reserved. Copyright of the adaption to Flex: (c) Mark Shepherd, Adobe FlexBuilder Engineering, 2006. Copyright of this reimplementation in Flex: (c) Daniel Lang, United Nations, 2007.
See license infortmation at the top.| Property | Defined by | ||
|---|---|---|---|
![]() | animInProgress : Boolean
Indicator if currently an animation sequence is still
in progress.
| BaseLayouter | |
![]() | autoFitEnabled : Boolean | BaseLayouter | |
| dampingActive : Boolean
This is a specific method for this layouter and
specifies if damping should be used or not.
| ForceDirectedLayouter | ||
![]() | disableAnimation : Boolean
If set to true, animation is disabled and direct
node location setting occurs (instantaneously).
| BaseLayouter | |
![]() | graph : IGraph
Assign a Graph datastructure object to the
layouter, every layouter will need one to work
and some may allow to set it in their constructor
| BaseLayouter | |
![]() | layoutChanged : Boolean | BaseLayouter | |
| linkLength : Number
Access to a value that controls the length
of links (or rather edges).
| ForceDirectedLayouter | ||
| rigidity : Number [write-only]
This is a local parameter specific to this layouter, that may
be accessed from outside, if required.
| ForceDirectedLayouter | ||
![]() | vgraph : IVisualGraph
Assign a VisualGraph object to the layouter,
every layouter will need one to work, some may
also offer to set it in their constructor.
| BaseLayouter | |
| Method | Defined by | ||
|---|---|---|---|
|
ForceDirectedLayouter(vg:IVisualGraph = null)
The constructor only initialises the data structures and presets
some parameters.
| ForceDirectedLayouter | ||
![]() |
bgDragContinue(event:MouseEvent):void
This is a NOP for this layouter.
| BaseLayouter | |
![]() |
bgDragEvent(event:MouseEvent):void
This is a NOP for this layouter.
| BaseLayouter | |
![]() |
bgDropEvent(event:MouseEvent):void
This is a NOP for this layouter.
| BaseLayouter | |
|
dragContinue(event:MouseEvent, vn:IVisualNode):void
Mouse Event Handling Methods
| ForceDirectedLayouter | ||
![]() |
dragEvent(event:MouseEvent, vn:IVisualNode):void
This method notifies the layouter about a drag/drop
operation.
| IterativeBaseLayouter | |
|
dropEvent(event:MouseEvent, vn:IVisualNode):void
Notifies the layouter of a node drop event, in case
it wants to react to that in special way.
| ForceDirectedLayouter | ||
![]() |
layoutPass():Boolean
This is the actual method that does a layout pass.
| IterativeBaseLayouter | |
|
refreshInit():void
In this implementation, this method resets the damper
value.
| ForceDirectedLayouter | ||
|
resetAll():void
Reset all layouting parameters, which may be
required during a significant layout change.
| ForceDirectedLayouter | ||
| Method | Defined by | ||
|---|---|---|---|
![]() |
applyTargetCoordinates(n:INode):void
Sets the current absolute target coordinates of a node
in the node's vnode.
| BaseLayouter | |
![]() |
applyTargetToNodes(vns:Dictionary):void
Applies the target coordinates to all nodes that
are in the Dictionary object passed as argument.
| BaseLayouter | |
|
calculateLayout():void
Layout Methods - Computational Methods
| ForceDirectedLayouter | ||
|
isStable():Boolean
| ForceDirectedLayouter | ||
![]() |
layoutIteration():Boolean
Do a full calculation iteration of the layout.
| IterativeBaseLayouter | |
| dampingActive | property |
dampingActive:Boolean [read-write]This is a specific method for this layouter and specifies if damping should be used or not.
Implementation public function get dampingActive():Boolean
public function set dampingActive(value:Boolean):void
| linkLength | property |
linkLength:Number [read-write]Access to a value that controls the length of links (or rather edges). It is up to the layouter what to do with it, and some may ignore this value under certain circumstances (like autoFit). The interface requires the value to be between 0 and 100;
Implementation public function get linkLength():Number
public function set linkLength(value:Number):void
| rigidity | property |
rigidity:Number [write-only]This is a local parameter specific to this layouter, that may be accessed from outside, if required. It handles how flexible the springy edges are.
Implementation public function set rigidity(value:Number):void
| ForceDirectedLayouter | () | constructor |
public function ForceDirectedLayouter(vg:IVisualGraph = null)The constructor only initialises the data structures and presets some parameters.
Parametersvg:IVisualGraph (default = null) |
| calculateLayout | () | method |
protected override function calculateLayout():voidLayout Methods - Computational Methods
| dragContinue | () | method |
public override function dragContinue(event:MouseEvent, vn:IVisualNode):voidMouse Event Handling Methods
Parametersevent:MouseEvent |
|
vn:IVisualNode |
| dropEvent | () | method |
public override function dropEvent(event:MouseEvent, vn:IVisualNode):voidNotifies the layouter of a node drop event, in case it wants to react to that in special way.
Parametersevent:MouseEvent |
|
vn:IVisualNode |
| isStable | () | method |
protected override function isStable():Boolean
Returns
Boolean |
| refreshInit | () | method |
public override function refreshInit():voidIn this implementation, this method resets the damper value.
| resetAll | () | method |
public override function resetAll():voidReset all layouting parameters, which may be required during a significant layout change. This is particularily important in this layouter, as it constantly updates the layout (using the timer).