Packagecom.asterisq.constellation.behaviors
Interfacepublic interface IBehavior extends flash.events.IEventDispatcher
ImplementorsBehavior

Interface for behaviors which affect node renderers. Each node renderer has the opportunity to modify each node renderer's acceleration, velocity, and position during each step in the visualization animation. To register a node renderer to affect the acceleration, velocity, or position, the affectsAcceleration(), affectsVelocity(), and/or affectsPosition() methods must be overridden to return true. Behaviors also have the opportunity to prepare for a step using the stepStart() call and another opportunity to clean up using the stepEnd() method.



Public Properties
 PropertyDefined by
  constellation : IConstellation
The constellation instance this behavior belongs to.
IBehavior
  enabled : Boolean
[read-only] Indicates whether this behavior is currently enabled.
IBehavior
  nodeRendererFilterFunction : Function
The function which determines the node renderers affected by this behavior.
IBehavior
Public Methods
 MethodDefined by
  
Indicates whether this class affects node renderers' acceleration.
IBehavior
  
Indicates whether the given node renderer is affected by this behavior.
IBehavior
  
affectsPosition():Boolean
Indicates whether this class affects node renderers' position.
IBehavior
  
affectsVelocity():Boolean
Indicates whether this class affects node renderers' velocity.
IBehavior
  
stepEnd():void
Method called at the end of a step.
IBehavior
  
stepStart():void
Method called at the beginning of a step.
IBehavior
  
Modifies the given node renderer's acceleration.
IBehavior
  
Modifies the given node renderer's position.
IBehavior
  
Modifies the given node renderer's velocity.
IBehavior
Property detail
constellationproperty
constellation:IConstellation  [read-write]

The constellation instance this behavior belongs to.

Implementation
    public function get constellation():IConstellation
    public function set constellation(value:IConstellation):void
enabledproperty 
enabled:Boolean  [read-only]

Indicates whether this behavior is currently enabled.

Implementation
    public function get enabled():Boolean
nodeRendererFilterFunctionproperty 
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
Method detail
affectsAcceleration()method
public function affectsAcceleration():Boolean

Indicates whether this class affects node renderers' acceleration. This function must return true if this behavior affects acceleration.

Returns
Boolean
affectsNodeRenderer()method 
public function affectsNodeRenderer(nr:INodeRenderer):Boolean

Indicates whether the given node renderer is affected by this behavior.

Parameters
nr:INodeRenderer

Returns
Boolean
affectsPosition()method 
public function affectsPosition():Boolean

Indicates whether this class affects node renderers' position. This function must return true if this behavior affects position.

Returns
Boolean
affectsVelocity()method 
public function affectsVelocity():Boolean

Indicates whether this class affects node renderers' velocity. This function must return true if this behavior affects velocity.

Returns
Boolean
stepEnd()method 
public function stepEnd():void

Method called at the end of a step.

stepStart()method 
public function stepStart():void

Method 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.

Parameters
nodeRenderer:INodeRenderer

Returns
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.

Parameters
nodeRenderer:INodeRenderer

Returns
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.

Parameters
nodeRenderer:INodeRenderer

Returns
INodeRenderer