Packageflare.vis.operator.layout
Classpublic class Layout
InheritanceLayout Inheritance Operator
SubclassesAxisLayout, CircleLayout, CirclePackingLayout, DendrogramLayout, Distortion, ForceDirectedLayout, IcicleTreeLayout, IndentedTreeLayout, NodeLinkTreeLayout, PieLayout, RadialTreeLayout, RandomLayout, StackedAreaLayout, TreeMapLayout

Base class for all operators that perform spatial layout. Provides methods for retrieving the desired layout bounds, providing a layout anchor point, and returning the layout root (for tree layouts in particular). This class also provides convenience methods for manipulating the visibility of axes and performing common updates to edge control points in graph/tree visualizations.



Public Properties
 PropertyDefined by
 Inheritedenabled : Boolean
Indicates if the operator is enabled or disabled.
Operator
  layoutAnchor : Point
The layout anchor, used by some layout instances to place an initial item or determine a focal point.
Layout
  layoutBounds : Rectangle
The layout bounds for the layout.
Layout
  layoutRoot : DataSprite
The layout root, the root node for tree layouts.
Layout
  layoutType : String = "null"
The type of layout and axes.
Layout
 Inheritedparameters : Object
Sets parameter values for this operator.
Operator
 Inheritedvisualization : Visualization
The visualization processed by this operator.
Operator
Protected Properties
 PropertyDefined by
  _anchor : Point
Layout
  _setAnchor : Boolean = false
Layout
  _t : Transitioner = null
A transitioner for storing value updates.
Layout
  xyAxes : CartesianAxes
[read-only] Returns the visualization's axes as a CartesianAxes instance.
Layout
Public Methods
 MethodDefined by
 Inherited
applyParameters(op:IOperator, params:Object):void
[static] Static method that applies parameter settings to an operator.
Operator
  
Strips all EdgeSprites in a visualization of any control points.
Layout
  
Hides the axes.
Layout
  
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
  
Reveals the axes.
Layout
  
[static] Updates all edges to be straight lines.
Layout
Protected Methods
 MethodDefined by
  
autoAnchor():void
Automatically-generate an anchor point.
Layout
  
layout():void
Calculates the spatial layout of visualized items.
Layout
  
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
  CARTESIAN : String = "cartesian"
[static] Constant indicating Cartesian (x, y) coordinates.
Layout
  POLAR : String = "polar"
[static] Constant indicating polar (radius, angle) coordinates.
Layout
Property detail
_anchorproperty
protected var _anchor:Point
layoutAnchorproperty 
layoutAnchor:Point  [read-write]

The layout anchor, used by some layout instances to place an initial item or determine a focal point.

Implementation
    public function get layoutAnchor():Point
    public function set layoutAnchor(value:Point):void
layoutBoundsproperty 
layoutBounds:Rectangle  [read-write]

The layout bounds for the layout. If this value is not explicitly set, the bounds for the visualization is returned.

Implementation
    public function get layoutBounds():Rectangle
    public function set layoutBounds(value:Rectangle):void
layoutRootproperty 
layoutRoot:DataSprite  [read-write]

The layout root, the root node for tree layouts.

Implementation
    public function get layoutRoot():DataSprite
    public function set layoutRoot(value:DataSprite):void
layoutTypeproperty 
public var layoutType:String = "null"

The type of layout and axes. This value should be CARTESIAN for x,y axes, POLAR for polar coordinates (radius, angle), or null for no axes.

_setAnchorproperty 
protected var _setAnchor:Boolean = false
_tproperty 
protected var _t:Transitioner = null

A transitioner for storing value updates.

xyAxesproperty 
xyAxes:CartesianAxes  [read-only]

Returns the visualization's axes as a CartesianAxes instance. Creates/modifies existing axes as needed to ensure the presence of CartesianAxes.

Implementation
    protected function get xyAxes():CartesianAxes
Method detail
autoAnchor()method
protected function autoAnchor():void

Automatically-generate an anchor point.

clearEdgePoints()method 
public function clearEdgePoints():void

Strips all EdgeSprites in a visualization of any control points.

hideAxes()method 
public function hideAxes(t:Transitioner = null):Transitioner

Hides the axes.

Parameters
t:Transitioner (default = null) — a transitioner to collect value updates

Returns
Transitioner — the input transitioner
layout()method 
protected function layout():void

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

minAngle()method 
protected function minAngle(a1:Number, a2:Number):Number

Returns an angle value that minimizes the angular distance between a reference angle and a target angle. This method may shift the angle value by multiples of 2 pi.

Parameters
a1:Number — the reference angle to stay close to
 
a2:Number — the target angle value

Returns
Number — an angle that minimizes the distance
operate()method 
public override function operate(t:Transitioner = null):void

Performs an operation over the contents of a visualization.

Parameters
t:Transitioner (default = null) — a Transitioner instance for collecting value updates.
showAxes()method 
public function showAxes(t:Transitioner = null):Transitioner

Reveals the axes.

Parameters
t:Transitioner (default = null) — a transitioner to collect value updates

Returns
Transitioner — the input transitioner
straightenEdges()method 
public static function straightenEdges(list:DataList, t:Transitioner):Transitioner

Updates all edges to be straight lines. Useful for undoing the results of layouts that route edges using edge control points.

Parameters
list:DataList — a data list of edges to straighten
 
t:Transitioner — a transitioner to collect value updates

Returns
Transitioner
Constant detail
CARTESIANconstant
public static const CARTESIAN:String = "cartesian"

Constant indicating Cartesian (x, y) coordinates.

POLARconstant 
public static const POLAR:String = "polar"

Constant indicating polar (radius, angle) coordinates.