Packageorg.un.flex.graphLayout.layout
Classpublic class DirectPlacementLayouter
InheritanceDirectPlacementLayouter Inheritance BaseLayouter
ImplementsILayoutAlgorithm

This layouter does not use any algorithm for node placement, but relys on coordinate information (x,y-coordinates) specified in each nodes associated XML object. It also takes a relative height and width parameter (which may be calculated by autofit) to put the specified coordinates into perspective.



Public Properties
 PropertyDefined by
 InheritedanimInProgress : Boolean
Indicator if currently an animation sequence is still in progress.
BaseLayouter
 InheritedautoFitEnabled : Boolean
BaseLayouter
  centeredLayout : Boolean
defines if the vgraph's center offset should be applied.
DirectPlacementLayouter
 InheriteddisableAnimation : Boolean
If set to true, animation is disabled and direct node location setting occurs (instantaneously).
BaseLayouter
 Inheritedgraph : 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
 InheritedlayoutChanged : Boolean
BaseLayouter
 InheritedlinkLength : Number
This is a NOP in the BaseLayouter class.
BaseLayouter
  relativeHeight : Number
Access the relative height for the y coordinates specified.
DirectPlacementLayouter
  relativeOrigin : Point
Access the relative origin, which will result in an offset for each coordinate, default is (0,0);
DirectPlacementLayouter
  relativeWidth : Number
Access the relative width for the x coordinates specified.
DirectPlacementLayouter
 Inheritedvgraph : 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
Protected Properties
 PropertyDefined by
 Inherited_autoFitEnabled : Boolean = false
The indicator if AutoFit should currently be used or not.
BaseLayouter
 InheritedcurrentDrawing : BaseLayoutDrawing
Allow to set the reference to the drawing object from derived classes.
BaseLayouter
 Inherited_disableAnimation : Boolean = false
If set to true, animation is disabled and direct node location setting occurs (instantaneously).
BaseLayouter
 Inherited_graph : IGraph = null
All layouters need access to the Graph.
BaseLayouter
 Inherited_layoutChanged : Boolean = false
This keeps track if the layout has changed and can be accessed by any derived layouter.
BaseLayouter
 Inherited_root : INode
The current root node of the layout.
BaseLayouter
 Inherited_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
 Inherited_vgraph : IVisualGraph = null
All layouters need access to the VisualGraph.
BaseLayouter
Public Methods
 MethodDefined by
  
The constructor only initialises some data structures.
DirectPlacementLayouter
 Inherited
bgDragContinue(event:MouseEvent):void
This is a NOP for this layouter.
BaseLayouter
 Inherited
bgDragEvent(event:MouseEvent):void
This is a NOP for this layouter.
BaseLayouter
 Inherited
bgDropEvent(event:MouseEvent):void
This is a NOP for this layouter.
BaseLayouter
 Inherited
dragContinue(event:MouseEvent, vn:IVisualNode):void
This is a NOP for this layouter.
BaseLayouter
 Inherited
dragEvent(event:MouseEvent, vn:IVisualNode):void
This is a NOP for this layouter.
BaseLayouter
 Inherited
dropEvent(event:MouseEvent, vn:IVisualNode):void
This is a NOP for this layouter.
BaseLayouter
  
layoutPass():Boolean
This main interface method computes and and executes the new layout.
DirectPlacementLayouter
 Inherited
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.
DirectPlacementLayouter
Protected Methods
 MethodDefined by
 Inherited
Sets the current absolute target coordinates of a node in the node's vnode.
BaseLayouter
 Inherited
applyTargetToNodes(vns:Dictionary):void
Applies the target coordinates to all nodes that are in the Dictionary object passed as argument.
BaseLayouter
Public Constants
 ConstantDefined by
 InheritedDEFAULT_MARGIN : Number = 30
[static] The default margin to be considered when using autoFit.
BaseLayouter
 InheritedMINIMUM_NODE_HEIGHT : Number = 5
[static] The default minimum node height to be used if the exact node height cannot be determined yet.
BaseLayouter
 InheritedMINIMUM_NODE_WIDTH : Number = 5
[static] The default minimum node width to be used if the exact node height cannot be determined yet.
BaseLayouter
Property detail
centeredLayoutproperty
public var centeredLayout:Boolean

defines if the vgraph's center offset should be applied. Set it to true if your coordinates assume a centered origin and you place them all around the center.

The default value is false.

relativeHeightproperty 
relativeHeight:Number  [read-write]

Access the relative height for the y coordinates specified. Default is 1000.

Implementation
    public function get relativeHeight():Number
    public function set relativeHeight(value:Number):void
relativeOriginproperty 
relativeOrigin:Point  [read-write]

Access the relative origin, which will result in an offset for each coordinate, default is (0,0);

Implementation
    public function get relativeOrigin():Point
    public function set relativeOrigin(value:Point):void
relativeWidthproperty 
relativeWidth:Number  [read-write]

Access the relative width for the x coordinates specified. Default is 1000.

Implementation
    public function get relativeWidth():Number
    public function set relativeWidth(value:Number):void
Constructor detail
DirectPlacementLayouter()constructor
public function DirectPlacementLayouter(vg:IVisualGraph = null)

The constructor only initialises some data structures.

Parameters
vg:IVisualGraph (default = null)
Method detail
layoutPass()method
public override function layoutPass():Boolean

This main interface method computes and and executes the new layout.

Returns
Boolean — Currently the return value is not set or used.
resetAll()method 
public override function 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. It would also stop any existing layouting loops/timers.