| Package | com.asterisq.constellation.behaviors |
| Class | public class TreeLayoutBehavior |
| Inheritance | TreeLayoutBehavior LayoutBehavior Behavior flash.events.EventDispatcher |
| Property | Defined by | ||
|---|---|---|---|
| alignment : String
The alignment of the layout to the origin point.
| TreeLayoutBehavior | ||
![]() | autoInvalidate : Boolean
Flag indicating whether to automatically invalidate when the renderers change.
| LayoutBehavior | |
| childSpacing : Number
The spacing between parent and child nodes in the layout.
| TreeLayoutBehavior | ||
| constellation : IConstellation
The constellation instance this behavior belongs to.
| TreeLayoutBehavior | ||
![]() | enabled : Boolean
Indicates whether this behavior is currently enabled.
| Behavior | |
![]() | nodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
| Behavior | |
| orientation : Number
The orientation (rotation) of the layout, in radians.
| TreeLayoutBehavior | ||
| origin : Point
The origin point to which the layout is aligned.
| TreeLayoutBehavior | ||
| rootNodeID : String
The ID of the tree's root node.
| TreeLayoutBehavior | ||
| siblingSpacing : Number
The spacing between sibling nodes in the layout.
| TreeLayoutBehavior | ||
| Method | Defined by | ||
|---|---|---|---|
|
TreeLayoutBehavior(childSpacing:Number = 50, siblingSpacing:Number = 100, orientation:Number, alignment:String)
Creates a new behavior.
| TreeLayoutBehavior | ||
![]() |
affectsAcceleration():Boolean
Indicates whether this class affects node renderers' acceleration.
| Behavior | |
![]() |
affectsNodeRenderer(nr:INodeRenderer):Boolean
Determines whether this behavior affects the given node renderer.
| Behavior | |
![]() |
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
| Behavior | |
![]() |
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
| Behavior | |
![]() |
[static]
Creates an IBehavior instance and initializes it with the given XML data.
| Behavior | |
![]() |
invalidate():void
Invalidates the layout and causes a redraw during the next step.
| LayoutBehavior | |
![]() |
stepEnd():void
Method called at the end of a step.
| Behavior | |
![]() |
stepStart():void
Method called at the beginning of a step.
| LayoutBehavior | |
![]() |
Modifies the given node renderer's acceleration.
| Behavior | |
![]() |
Modifies the given node renderer's position.
| Behavior | |
![]() |
Modifies the given node renderer's velocity.
| Behavior | |
|
validate():Boolean
The layout validation method.
| TreeLayoutBehavior | ||
| Method | Defined by | ||
|---|---|---|---|
|
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
| TreeLayoutBehavior | ||
![]() |
setNodeRendererTargetPosition(tnr:ITweenableNodeRenderer, origin:Point, targetPosition:Point, startTime:Number):void
Convenience function for setting the ITweenableNodeRenderer
animation properties.
| LayoutBehavior | |
| Constant | Defined by | ||
|---|---|---|---|
| CENTER : String = "center" [static] Aligns the layout's center with the origin.
| TreeLayoutBehavior | ||
| HORIZONTAL : Number = 0 [static] Orients the layout horizontally.
| TreeLayoutBehavior | ||
| ROOT_NODE : String = "rootNode" [static] Aligns the root node with the origin.
| TreeLayoutBehavior | ||
| VERTICAL : Number [static] Orients the layout vertically.
| TreeLayoutBehavior | ||
| alignment | property |
alignment:String [read-write]
The alignment of the layout to the origin point. Set
this to TreeLayoutBehavior.CENTER to align
the center of the layout with the origin. Set this to
TreeLayoutBehavior.ROOT_NODE to align the
root node with the origin.
Setting this value causes the layout to redraw.
Implementation public function get alignment():String
public function set alignment(value:String):void
| childSpacing | property |
childSpacing:Number [read-write]The spacing between parent and child nodes in the layout.
Setting this value causes the layout to redraw.
Implementation public function get childSpacing():Number
public function set childSpacing(value:Number):void
| constellation | property |
constellation:IConstellation [read-write]The constellation instance this behavior belongs to.
Implementation public function get constellation():IConstellation
public function set constellation(value:IConstellation):void
| orientation | property |
orientation:Number [read-write]
The orientation (rotation) of the layout, in radians. Set
to TreeLayoutBehavior.HORIZONTAL or
TreeLayoutBehavior.VERTICAL.
Setting this value causes the layout to redraw.
Implementation public function get orientation():Number
public function set orientation(value:Number):void
| origin | property |
origin:Point [read-write]
The origin point to which the layout is aligned. Actual alignment
behavior depends on the value of alignment.
If the origin is set to null, then the behavior
depends on the alignment value. If the alignment is
set to CENTER, the layout is centered on
the Constellation graph visualization. If the alignment is set to
ROOT_NODE, the layout is aligned to the current
position of the root node.
Setting this value causes the layout to redraw.
Implementation public function get origin():Point
public function set origin(value:Point):void
| rootNodeID | property |
rootNodeID:String [read-write]The ID of the tree's root node.
Setting this value causes the layout to redraw.
Implementation public function get rootNodeID():String
public function set rootNodeID(value:String):void
| siblingSpacing | property |
siblingSpacing:Number [read-write]The spacing between sibling nodes in the layout.
Setting this value causes the layout to redraw.
Implementation public function get siblingSpacing():Number
public function set siblingSpacing(value:Number):void
| TreeLayoutBehavior | () | constructor |
public function TreeLayoutBehavior(childSpacing:Number = 50, siblingSpacing:Number = 100, orientation:Number, alignment:String)Creates a new behavior.
ParameterschildSpacing:Number (default = 50) |
|
siblingSpacing:Number (default = 100) |
|
orientation:Number |
|
alignment:String |
| loadValuesFromXML | () | method |
protected override function loadValuesFromXML(behaviorElem:XML):voidUpdates this behavior with values from the given XML element. This method should be overridden to update this Behavior.
ParametersbehaviorElem:XML |
| validate | () | method |
public override function validate():BooleanThe layout validation method. Returns true if validation was successful.
This method should be overridden to update the
ITweenableNodeRenderer properties according to the
layout algorithm.
Boolean |
| CENTER | constant |
public static const CENTER:String = "center"Aligns the layout's center with the origin.
| HORIZONTAL | constant |
public static const HORIZONTAL:Number = 0Orients the layout horizontally.
| ROOT_NODE | constant |
public static const ROOT_NODE:String = "rootNode"Aligns the root node with the origin.
| VERTICAL | constant |
public static const VERTICAL:NumberOrients the layout vertically.