Packageflare.vis.operator.layout
Classpublic class NodeLinkTreeLayout
InheritanceNodeLinkTreeLayout Inheritance Layout Inheritance Operator

Layout that places nodes using a tidy layout of a node-link tree diagram. This algorithm lays out a rooted tree such that each depth level of the tree is on a shared line. The orientation of the tree can be set such that the tree goes left-to-right (default), right-to-left, top-to-bottom, or bottom-to-top.

The algorithm used is that of Christoph Buchheim, Michael Jünger, and Sebastian Leipert from their research paper Improving Walker's Algorithm to Run in Linear Time, Graph Drawing 2002. This algorithm corrects performance issues in Walker's algorithm, which generalizes Reingold and Tilford's method for tidy drawings of trees to support trees with an arbitrary number of children at any given node.



Public Properties
 PropertyDefined by
  breadthSpacing : Number
The space between siblings in the tree.
NodeLinkTreeLayout
  depthSpacing : Number
The space between successive depth levels of the tree.
NodeLinkTreeLayout
 Inheritedenabled : Boolean
Indicates if the operator is enabled or disabled.
Operator
 InheritedlayoutAnchor : Point
The layout anchor, used by some layout instances to place an initial item or determine a focal point.
Layout
 InheritedlayoutBounds : Rectangle
The layout bounds for the layout.
Layout
 InheritedlayoutRoot : DataSprite
The layout root, the root node for tree layouts.
Layout
 InheritedlayoutType : String = "null"
The type of layout and axes.
Layout
  orientation : String
The orientation of the layout.
NodeLinkTreeLayout
 Inheritedparameters : Object
Sets parameter values for this operator.
Operator
  subtreeSpacing : Number
The space between different sub-trees.
NodeLinkTreeLayout
 Inheritedvisualization : Visualization
The visualization processed by this operator.
Operator
Protected Properties
 PropertyDefined by
 Inherited_anchor : Point
Layout
 Inherited_setAnchor : Boolean = false
Layout
 Inherited_t : Transitioner = null
A transitioner for storing value updates.
Layout
 InheritedxyAxes : CartesianAxes
Returns the visualization's axes as a CartesianAxes instance.
Layout
Public Methods
 MethodDefined by
  
NodeLinkTreeLayout(orientation:String, depthSpace:Number = 50, breadthSpace:Number = 5, subtreeSpace:Number = 25)
Creates a new NodeLinkTreeLayout.
NodeLinkTreeLayout
 Inherited
applyParameters(op:IOperator, params:Object):void
[static] Static method that applies parameter settings to an operator.
Operator
 Inherited
Strips all EdgeSprites in a visualization of any control points.
Layout
 Inherited
Hides the axes.
Layout
 Inherited
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
Layout
 Inherited
setup():void
Setup method invoked whenever this operator's visualization property is set.
Operator
 Inherited
Reveals the axes.
Layout
 Inherited
[static] Updates all edges to be straight lines.
Layout
Protected Methods
 MethodDefined by
  
autoAnchor():void
NodeLinkTreeLayout
  
layout():void
Calculates the spatial layout of visualized items.
NodeLinkTreeLayout
 Inherited
minAngle(a1:Number, a2:Number):Number
Returns an angle value that minimizes the angular distance between a reference angle and a target angle.
Layout
Public Constants
 ConstantDefined by
 InheritedCARTESIAN : String = "cartesian"
[static] Constant indicating Cartesian (x, y) coordinates.
Layout
  PARAMS : String = "nodeLinkTreeLayoutParams"
[static] Property name for storing parameters for this layout.
NodeLinkTreeLayout
 InheritedPOLAR : String = "polar"
[static] Constant indicating polar (radius, angle) coordinates.
Layout
Property detail
breadthSpacingproperty
breadthSpacing:Number  [read-write]

The space between siblings in the tree.

Implementation
    public function get breadthSpacing():Number
    public function set breadthSpacing(value:Number):void
depthSpacingproperty 
depthSpacing:Number  [read-write]

The space between successive depth levels of the tree.

Implementation
    public function get depthSpacing():Number
    public function set depthSpacing(value:Number):void
orientationproperty 
orientation:String  [read-write]

The orientation of the layout.

Implementation
    public function get orientation():String
    public function set orientation(value:String):void
subtreeSpacingproperty 
subtreeSpacing:Number  [read-write]

The space between different sub-trees.

Implementation
    public function get subtreeSpacing():Number
    public function set subtreeSpacing(value:Number):void
Constructor detail
NodeLinkTreeLayout()constructor
public function NodeLinkTreeLayout(orientation:String, depthSpace:Number = 50, breadthSpace:Number = 5, subtreeSpace:Number = 25)

Creates a new NodeLinkTreeLayout.

Parameters
orientation:String — the orientation of the layout
 
depthSpace:Number (default = 50) — the space between depth levels in the tree
 
breadthSpace:Number (default = 5) — the space between siblings in the tree
 
subtreeSpace:Number (default = 25) — the space between different sub-trees
Method detail
autoAnchor()method
protected override function autoAnchor():void
layout()method 
protected override function layout():void

Calculates the spatial layout of visualized items. Layout operators override this method with their layout implementations.

Constant detail
PARAMSconstant
public static const PARAMS:String = "nodeLinkTreeLayoutParams"

Property name for storing parameters for this layout.