Packageorg.un.flex.graphLayout.layout
Classpublic class ConcentricRadialLayouter
InheritanceConcentricRadialLayouter Inheritance AnimatedBaseLayouter Inheritance BaseLayouter
ImplementsILayoutAlgorithm

This is an implementation of the generic radial layout algorithm that uses concentric rings for the distance. In addition it will implement the animation algorithm by Yee et. al that moves nodes along their circles instead of in straight lines.



Public Properties
 PropertyDefined by
 InheritedanimInProgress : Boolean
Indicator if currently an animation sequence is still in progress.
AnimatedBaseLayouter
 InheritedautoFitEnabled : Boolean
BaseLayouter
 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
  linkLength : Number
Access to a value that controls the length of links (or rather edges).
ConcentricRadialLayouter
 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
 InheritedanimationType : int
Access to the type of animation, currently supported type is: ANIM_RADIAL which does interpolation of polar coordinates and ANIM_STRAIGHT which interpolates cartesian coordinates.
AnimatedBaseLayouter
 Inherited_animInProgress : Boolean = false
Indicator if there is currently an animation in progress
AnimatedBaseLayouter
 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.
AnimatedBaseLayouter
 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 initializes the layouter and may assign already a VisualGraph object, but this can also be set later.
ConcentricRadialLayouter
 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 is the main method of the layouter, that actually implements the calculation of the layout.
ConcentricRadialLayouter
 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.
ConcentricRadialLayouter
  
setAngularBounds(theta:Number, width:Number):void
Presets the angular bounds of the layout, if desired.
ConcentricRadialLayouter
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
 Inherited
Interpolates the target coordinates with the current real coordinates achieving a smooth animation.
AnimatedBaseLayouter
 Inherited
Interpolates the target Polar coordinates with the current real coordinates achieving a smooth animation.
AnimatedBaseLayouter
 Inherited
killTimer():void
This method kills any currently running timers which is needed if some data is going to be reinitialised.
AnimatedBaseLayouter
 Inherited
Reset/Reinitialise animation related variables.
AnimatedBaseLayouter
 Inherited
setCoords():Boolean
Directly sets the target coordinates not animating anything.
AnimatedBaseLayouter
 Inherited
This method starts the animation according to the preset type in the _animationType variable.
AnimatedBaseLayouter
Public Constants
 ConstantDefined by
 InheritedANIM_RADIAL : int = 1
constant to define the radial animation type, which interpolates node's polar coordinates.
AnimatedBaseLayouter
 InheritedANIM_STRAIGHT : int = 2
constant to define the radial animation type, which interpolates node's polar coordinates.
AnimatedBaseLayouter
 InheritedDEFAULT_MARGIN : Number = 30
[static] The default margin to be considered when using autoFit.
BaseLayouter
  DEFAULT_RADIUS : Number = 50
[static] The default radius increase between the concentric circles.
ConcentricRadialLayouter
 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
linkLengthproperty
linkLength:Number  [read-write]

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
Constructor detail
ConcentricRadialLayouter()constructor
public function ConcentricRadialLayouter(vg:IVisualGraph = null)

The constructor initializes the layouter and may assign already a VisualGraph object, but this can also be set later.

Parameters
vg:IVisualGraph (default = null) — The VisualGraph object on which this layouter should work on.
Method detail
layoutPass()method
public override function layoutPass():Boolean

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.

Returns
Boolean — true if something was done successfully, false otherwise.
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.

setAngularBounds()method 
public function setAngularBounds(theta:Number, width:Number):void

Presets the angular bounds of the layout, if desired. This allows to restrict the layout from drawing a full circle to only draw in a segment of the circle. WARNING: XXX THIS HAS NOT BEEN TESTED YET

Parameters
theta:Number — The starting angle in radians of the bounding segment. Default is 0.
 
width:Number — The angular width of the segment in radians. Default is 2I.
Constant detail
DEFAULT_RADIUSconstant
public static const DEFAULT_RADIUS:Number = 50

The default radius increase between the concentric circles.