| Package | org.un.flex.graphLayout.layout |
| Class | public class IterativeBaseLayouter |
| Inheritance | IterativeBaseLayouter BaseLayouter |
| Implements | ILayoutAlgorithm |
| Subclasses | ForceDirectedLayouter, Hyperbolic2DLayouter, ISOMLayouter |
| Property | Defined by | ||
|---|---|---|---|
![]() | _autoFitEnabled : Boolean = false
The indicator if AutoFit should currently be used or not.
| BaseLayouter | |
![]() | currentDrawing : BaseLayoutDrawing
Allow to set the reference to the drawing object from
derived classes.
| BaseLayouter | |
![]() | _disableAnimation : Boolean = false
If set to true, animation is disabled and direct
node location setting occurs (instantaneously).
| BaseLayouter | |
| _dragNode : IVisualNode = null | IterativeBaseLayouter | ||
![]() | _graph : IGraph = null
All layouters need access to the Graph.
| BaseLayouter | |
![]() | _layoutChanged : Boolean = false
This keeps track if the layout has changed
and can be accessed by any derived layouter.
| BaseLayouter | |
![]() | _root : INode
The current root node of the layout.
| BaseLayouter | |
![]() | _stree : IGTree
A spanning tree of the graph, since probably every layout
will work on a spanning tree, we keep this one in this
base class.
| BaseLayouter | |
![]() | _vgraph : IVisualGraph = null
All layouters need access to the VisualGraph.
| BaseLayouter | |
| Method | Defined by | ||
|---|---|---|---|
|
IterativeBaseLayouter(vg:IVisualGraph = null)
The constructor only initialises the data structures and presets
some parameters.
| IterativeBaseLayouter | ||
![]() |
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
This is a NOP for this layouter.
| BaseLayouter | |
|
dragEvent(event:MouseEvent, vn:IVisualNode):void
This method notifies the layouter about a drag/drop
operation.
| IterativeBaseLayouter | ||
|
dropEvent(event:MouseEvent, vn:IVisualNode):void
If we receive a drop event, we delete the drag node.
| IterativeBaseLayouter | ||
|
layoutPass():Boolean
This is the actual method that does a layout pass.
| IterativeBaseLayouter | ||
![]() |
refreshInit():void
This is a NOP for this layouter.
| BaseLayouter | |
|
resetAll():void
Reset all layouting parameters, which may be
required during a significant layout change.
| IterativeBaseLayouter | ||
| 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
Calculation step of the layout.
| IterativeBaseLayouter | ||
|
isStable():Boolean
Checks if the layout has stabilized.
| IterativeBaseLayouter | ||
|
layoutIteration():Boolean
Do a full calculation iteration of the layout.
| IterativeBaseLayouter | ||
| _dragNode | property |
protected var _dragNode:IVisualNode = null
| IterativeBaseLayouter | () | constructor |
public function IterativeBaseLayouter(vg:IVisualGraph = null)The constructor only initialises the data structures and presets some parameters.
Parametersvg:IVisualGraph (default = null) |
| calculateLayout | () | method |
protected function calculateLayout():voidCalculation step of the layout. Sub-classes should override this method to define actual layout computations for every step.
| dragEvent | () | method |
public override function dragEvent(event:MouseEvent, vn:IVisualNode):voidThis method notifies the layouter about a drag/drop operation. This is important to exempt are currently dragged node from the layouting, to allow it to drag the whole graph with it. This method basically sets the current drag node.
Parametersevent:MouseEvent — The mouse event that is fired on the starting of the drag operation.
|
|
vn:IVisualNode — The node which is being dragged.
|
| dropEvent | () | method |
public override function dropEvent(event:MouseEvent, vn:IVisualNode):voidIf we receive a drop event, we delete the drag node.
Parametersevent:MouseEvent — The mouse event that is fired on the starting of the drag operation.
|
|
vn:IVisualNode — The node which is being dragged.
|
| isStable | () | method |
protected function isStable():BooleanChecks if the layout has stabilized. Sub-classes should define terminating conditions for the layout computations.
ReturnsBoolean — true if the layout has stabilized
|
| layoutIteration | () | method |
protected function layoutIteration():BooleanDo a full calculation iteration of the layout. This is a wrapper only; the actual computation at every step is done in calculateLayout()
ReturnsBoolean |
| layoutPass | () | method |
public override function layoutPass():BooleanThis is the actual method that does a layout pass. In this Layouter, it is supposed to interrupt and kick-off a new layout cycle, which is different from most others, since this layouter keeps on calculating the layout through a timer.
ReturnsBoolean |
| 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).