| Package | com.asterisq.constellation.behaviors |
| Class | public class Behavior |
| Inheritance | Behavior flash.events.EventDispatcher |
| Implements | IBehavior |
| Subclasses | AccelerationLimitBehavior, AccelerationStatsBehavior, AgoraphobeBehavior, AutoCenteringBehavior, BasicKinematicsBehavior, BoundedKinematicsBehavior, BoundsAutoCenteringBehavior, CartesianInterpolationBehavior, DampingBehavior, DraggingBehavior, EdgeAttractionBehavior, EdgeWeightStatsBehavior, LayoutBehavior, NodeCenteringBehavior, PolarInterpolationBehavior, RingBehavior, VelocityLimitBehavior, VelocityReductionBehavior, VelocityStatsBehavior, ZeroAccelerationBehavior |
| Property | Defined by | ||
|---|---|---|---|
| constellation : IConstellation
The constellation instance this behavior belongs to.
| Behavior | ||
| enabled : Boolean
Indicates whether this behavior is currently enabled.
| Behavior | ||
| nodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
| Behavior | ||
| Method | Defined by | ||
|---|---|---|---|
|
Behavior()
Creates a new base behavior.
| Behavior | ||
|
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 | ||
|
stepEnd():void
Method called at the end of a step.
| Behavior | ||
|
stepStart():void
Method called at the beginning of a step.
| Behavior | ||
|
Modifies the given node renderer's acceleration.
| Behavior | ||
|
Modifies the given node renderer's position.
| Behavior | ||
|
Modifies the given node renderer's velocity.
| Behavior | ||
| Method | Defined by | ||
|---|---|---|---|
|
loadValuesFromXML(behaviorElem:XML):void
Updates this behavior with values from the given XML element.
| Behavior | ||
| 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
| enabled | property |
enabled:Boolean [read-write]Indicates whether this behavior is currently enabled.
Implementation public function get enabled():Boolean
public function set enabled(value:Boolean):void
| nodeRendererFilterFunction | property |
nodeRendererFilterFunction:Function [read-write]The function which determines the node renderers affected by this behavior. The filter function should take an INodeRenderer as its only parameter and return true if the node is affected and false otherwise.
Implementation public function get nodeRendererFilterFunction():Function
public function set nodeRendererFilterFunction(value:Function):void
| Behavior | () | constructor |
public function Behavior()Creates a new base behavior.
| affectsAcceleration | () | method |
public function affectsAcceleration():BooleanIndicates whether this class affects node renderers' acceleration. This function must return true if this behavior affects acceleration.
ReturnsBoolean |
| affectsNodeRenderer | () | method |
public function affectsNodeRenderer(nr:INodeRenderer):BooleanDetermines whether this behavior affects the given node renderer.
Parametersnr:INodeRenderer |
Boolean |
| affectsPosition | () | method |
public function affectsPosition():BooleanIndicates whether this class affects node renderers' position. This function must return true if this behavior affects position.
ReturnsBoolean |
| affectsVelocity | () | method |
public function affectsVelocity():BooleanIndicates whether this class affects node renderers' velocity. This function must return true if this behavior affects velocity.
ReturnsBoolean |
| fromXML | () | method |
public static function fromXML(elem:XML):Behavior
Creates an IBehavior instance and initializes it with the given XML data.
The particular IBehavior that is loaded depends on the value of the
class_name attribute.
elem:XML |
Behavior |
| loadValuesFromXML | () | method |
protected 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 |
| stepEnd | () | method |
public function stepEnd():voidMethod called at the end of a step.
| stepStart | () | method |
public function stepStart():voidMethod called at the beginning of a step.
| updateAcceleration | () | method |
public function updateAcceleration(nodeRenderer:INodeRenderer):INodeRenderer
Modifies the given node renderer's acceleration. This method will never be
called if affectsAcceleration() doesn't return true. This
method should be overridden to affect the given node renderer's
acceleration.
nodeRenderer:INodeRenderer |
INodeRenderer |
| updatePosition | () | method |
public function updatePosition(nodeRenderer:INodeRenderer):INodeRenderer
Modifies the given node renderer's position. This method will never be
called if affectsPosition() doesn't return true. This
method should be overridden to affect the given node renderer's position.
nodeRenderer:INodeRenderer |
INodeRenderer |
| updateVelocity | () | method |
public function updateVelocity(nodeRenderer:INodeRenderer):INodeRenderer
Modifies the given node renderer's velocity. This method will never be
called if affectsVelocity() doesn't return true. This
method should be overridden to affect the given node renderer's velocity.
nodeRenderer:INodeRenderer |
INodeRenderer |