| Package | org.un.flex.graphLayout.layout |
| Class | public class BaseLayouter |
| Implements | ILayoutAlgorithm |
| Subclasses | AnimatedBaseLayouter, DirectPlacementLayouter, IterativeBaseLayouter |
| Property | Defined by | ||
|---|---|---|---|
| animInProgress : Boolean [read-only]
Indicator if currently an animation sequence is still
in progress.
| BaseLayouter | ||
| autoFitEnabled : Boolean | BaseLayouter | ||
| disableAnimation : Boolean
If set to true, animation is disabled and direct
node location setting occurs (instantaneously).
| BaseLayouter | ||
| graph : IGraph
[write-only]
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
This is a NOP in the BaseLayouter class.
| BaseLayouter | ||
| vgraph : IVisualGraph
[write-only]
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 | ||
| Property | Defined by | ||
|---|---|---|---|
| _autoFitEnabled : Boolean = false
The indicator if AutoFit should currently be used or not.
| BaseLayouter | ||
| currentDrawing : BaseLayoutDrawing
[write-only]
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 | ||
| _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 | ||
|---|---|---|---|
|
BaseLayouter(vg:IVisualGraph = null)
The constructor initializes the layouter and may assign
already a VisualGraph object, but this can also be set later.
| BaseLayouter | ||
|
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 is a NOP for this layouter.
| BaseLayouter | ||
|
dropEvent(event:MouseEvent, vn:IVisualNode):void
This is a NOP for this layouter.
| BaseLayouter | ||
|
layoutPass():Boolean
This is a NOP in the BaseLayouter class and always returns true.
| BaseLayouter | ||
|
refreshInit():void
This is a NOP for this layouter.
| BaseLayouter | ||
|
resetAll():void
This should reset all parameters of the layouter,
which might not be needed for all layouters, and it is
up to each layouter to do something with it.
| BaseLayouter | ||
| 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 | ||
| Constant | Defined by | ||
|---|---|---|---|
| DEFAULT_MARGIN : Number = 30 [static]
The default margin to be considered when using
autoFit.
| BaseLayouter | ||
| MINIMUM_NODE_HEIGHT : Number = 5 [static]
The default minimum node height to be used if the exact node
height cannot be determined yet.
| BaseLayouter | ||
| MINIMUM_NODE_WIDTH : Number = 5 [static]
The default minimum node width to be used if the exact node
height cannot be determined yet.
| BaseLayouter | ||
| animInProgress | property |
animInProgress:Boolean [read-only]Indicator if currently an animation sequence is still in progress. During certain animation sequences, drag&drop might be disabled
Implementation public function get animInProgress():Boolean
| _autoFitEnabled | property |
protected var _autoFitEnabled:Boolean = falseThe indicator if AutoFit should currently be used or not.
| autoFitEnabled | property |
autoFitEnabled:Boolean [read-write]
This property can be used as the source for data binding.
Implementation public function get autoFitEnabled():Boolean
public function set autoFitEnabled(value:Boolean):void
| currentDrawing | property |
currentDrawing:BaseLayoutDrawing [write-only]Allow to set the reference to the drawing object from derived classes. This is important because of the type issue, the _currentDrawing variable will be declared separately in each derived layouter, but this one must have access to it anyway, to do the animation
Implementation protected function set currentDrawing(value:BaseLayoutDrawing):void
| _disableAnimation | property |
protected var _disableAnimation:Boolean = falseIf set to true, animation is disabled and direct node location setting occurs (instantaneously).
The default value is false.
| disableAnimation | property |
disableAnimation:Boolean [read-write]If set to true, animation is disabled and direct node location setting occurs (instantaneously).
Implementation public function get disableAnimation():Boolean
public function set disableAnimation(value:Boolean):void
| _graph | property |
protected var _graph:IGraph = nullAll layouters need access to the Graph.
| graph | property |
graph:IGraph [write-only]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
Implementation public function set graph(value:IGraph):void
| _layoutChanged | property |
protected var _layoutChanged:Boolean = falseThis keeps track if the layout has changed and can be accessed by any derived layouter.
| layoutChanged | property |
layoutChanged:Boolean [read-write]Implementation
public function get layoutChanged():Boolean
public function set layoutChanged(value:Boolean):void
| linkLength | property |
linkLength:Number [read-write]This is a NOP in the BaseLayouter class. It does not set anything and always returns 0. 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;
This property can be used as the source for data binding.
Implementation public function get linkLength():Number
public function set linkLength(value:Number):void
| _root | property |
protected var _root:INodeThe current root node of the layout.
| _stree | property |
protected var _stree:IGTreeA spanning tree of the graph, since probably every layout will work on a spanning tree, we keep this one in this base class.
| _vgraph | property |
protected var _vgraph:IVisualGraph = nullAll layouters need access to the VisualGraph.
| vgraph | property |
vgraph:IVisualGraph [write-only]Assign a VisualGraph object to the layouter, every layouter will need one to work, some may also offer to set it in their constructor. The layouter may choose to implicitly also set the graph object if it is found within the VisualGraph object.
Implementation public function set vgraph(value:IVisualGraph):void
— error if the vgraph was already set.
|
| BaseLayouter | () | constructor |
public function BaseLayouter(vg:IVisualGraph = null)The constructor initializes the layouter and may assign already a VisualGraph object, but this can also be set later.
Parametersvg:IVisualGraph (default = null) — The VisualGraph object on which this layouter should work on.
|
| applyTargetCoordinates | () | method |
protected function applyTargetCoordinates(n:INode):voidSets the current absolute target coordinates of a node in the node's vnode. This does not yet move the node, as for this the vnode's commit() method must be called.
Parametersn:INode — The node to get its target coordinates updated.
|
| applyTargetToNodes | () | method |
protected function applyTargetToNodes(vns:Dictionary):voidApplies the target coordinates to all nodes that are in the Dictionary object passed as argument. The items are expected to be VNodes (as typically a list of currently visible VNodes is passed).
Parametersvns:Dictionary |
| bgDragContinue | () | method |
public function bgDragContinue(event:MouseEvent):voidThis is a NOP for this layouter. Notifies the layouter of a background drag-in-process event, in case it wants to react to that in special way.
Parametersevent:MouseEvent |
| bgDragEvent | () | method |
public function bgDragEvent(event:MouseEvent):voidThis is a NOP for this layouter. Notifies the layouter of a backgroung drag event, in case it wants to react to that in special way.
Parametersevent:MouseEvent |
| bgDropEvent | () | method |
public function bgDropEvent(event:MouseEvent):voidThis is a NOP for this layouter. Notifies the layouter of a background drop event, in case it wants to react to that in special way.
Parametersevent:MouseEvent |
| dragContinue | () | method |
public function dragContinue(event:MouseEvent, vn:IVisualNode):voidThis is a NOP for this layouter. Notifies the layouter of a node dragging-in-process event, in case it wants to react to that in special way.
Parametersevent:MouseEvent |
|
vn:IVisualNode |
| dragEvent | () | method |
public function dragEvent(event:MouseEvent, vn:IVisualNode):voidThis is a NOP for this layouter. Notifies the layouter of a node drag event, in case it wants to react to that in special way.
Parametersevent:MouseEvent |
|
vn:IVisualNode |
| dropEvent | () | method |
public function dropEvent(event:MouseEvent, vn:IVisualNode):voidThis is a NOP for this layouter. Notifies the layouter of a node drop event, in case it wants to react to that in special way.
Parametersevent:MouseEvent |
|
vn:IVisualNode |
| layoutPass | () | method |
public function layoutPass():BooleanThis is a NOP in the BaseLayouter class and always returns true. This is the main method of the layouter, that actually implements the calculation of the layout. It will be called by the VisualGraph on any significant change that will require a layout to be recomputed.
ReturnsBoolean — true if something was done successfully, false otherwise.
|
| refreshInit | () | method |
public function refreshInit():voidThis is a NOP for this layouter. This is an initialisation method to do any kind of initialisation before a layout pass. Not all layouters may require this and thus implement it meaningfully.
| resetAll | () | method |
public function resetAll():voidThis should reset all parameters of the layouter, which might not be needed for all layouters, and it is up to each layouter to do something with it. It would also stop any existing layouting loops/timers.
| DEFAULT_MARGIN | constant |
public static const DEFAULT_MARGIN:Number = 30The default margin to be considered when using autoFit.
| MINIMUM_NODE_HEIGHT | constant |
public static const MINIMUM_NODE_HEIGHT:Number = 5The default minimum node height to be used if the exact node height cannot be determined yet.
| MINIMUM_NODE_WIDTH | constant |
public static const MINIMUM_NODE_WIDTH:Number = 5The default minimum node width to be used if the exact node height cannot be determined yet.