Packageflare.vis.operator
Classpublic class OperatorSwitch
InheritanceOperatorSwitch Inheritance OperatorList Inheritance flash.utils.Proxy

An OperatorSwitch maintains a list of operators but only runs one of these operators when invoked. A switch allows different operator chains to be executed at different times. Operators can be added to an OperatorSwitch using the add method. Once added, operators can be retrieved and set using their index in the list, either with array notation ([]) or with the getOperatorAt and setOperatorAt methods.

The current sub-operator to run is determined by the index property. This index can be set manually or can be automatically determined upon each invocation by assigning a custom function to the indexFunction property.



Public Properties
 PropertyDefined by
 Inheritedenabled : Boolean
Indicates if the operator is enabled or disabled.
OperatorList
 Inheritedfirst : Object
Returns the first operator in the list.
OperatorList
  index : int
The currently active index of the switch.
OperatorSwitch
  indexFunction : Function = null
A function that determines the current index value of this OperatorSwitch.
OperatorSwitch
 Inheritedlast : Object
Returns the last operator in the list.
OperatorList
 Inheritedlength : uint
The number of operators in the list.
OperatorList
 Inheritedlist : Array
An array of the operators contained in the operator list.
OperatorList
 Inheritedparameters : Object
Sets parameter values for this operator.
OperatorList
 Inheritedvisualization : Visualization
The visualization processed by this operator.
OperatorList
Protected Properties
 PropertyDefined by
 Inherited_enabled : Boolean = true
OperatorList
 Inherited_list : Array
OperatorList
 Inherited_vis : Visualization
OperatorList
Public Methods
 MethodDefined by
  
OperatorSwitch(... ops)
Creates a new OperatorSwitch.
OperatorSwitch
 Inherited
add(op:IOperator):void
Adds an operator to the end of this list.
OperatorList
 Inherited
clear():void
Removes all operators from this list.
OperatorList
 Inherited
Returns the operator at the specified position in the list
OperatorList
  
operate(t:Transitioner = null):void
Performs an operation over the contents of a visualization.
OperatorSwitch
 Inherited
remove(op:IOperator):Boolean
Removes an operator from this list.
OperatorList
 Inherited
Removes the operator at the specified position in the list
OperatorList
 Inherited
Set the operator at the specified position in the list
OperatorList
 Inherited
setup():void
Setup method invoked whenever this operator's visualization property is set.
OperatorList
Protected Methods
 MethodDefined by
 Inherited
getProperty(name:*):*
Proxy method for retrieving operators from the internal array.
OperatorList
 Inherited
setProperty(name:*, value:*):void
Proxy method for setting operators in the internal array.
OperatorList
Property detail
indexproperty
index:int  [read-write]

The currently active index of the switch. Only the operator at this index is run when the operate method is called.

Implementation
    public function get index():int
    public function set index(value:int):void
indexFunctionproperty 
public var indexFunction:Function = null

A function that determines the current index value of this OperatorSwitch. This can be used to have the operator automatically adjust which sub-operators to run. If this property is non-null, the function will be invoked each time this OperatorSwitch is run and the index property will be set with the resulting value, overriding any previous index setting. The index function should accept zero arguments and return an integer that is a legal index value for this switch. If the returned value is not a legal index value (i.e., it is not an integer or is out of bounds) then no sub-operators will be run.

Constructor detail
OperatorSwitch()constructor
public function OperatorSwitch(... ops)

Creates a new OperatorSwitch.

Parameters
... ops — an ordered set of operators to include in the switch.
Method detail
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.