| Package | flare.vis.operator |
| Class | public class OperatorSwitch |
| Inheritance | OperatorSwitch OperatorList flash.utils.Proxy |
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.
| Property | Defined by | ||
|---|---|---|---|
![]() | enabled : Boolean Indicates if the operator is enabled or disabled.
| OperatorList | |
![]() | first : 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 | ||
![]() | last : Object Returns the last operator in the list.
| OperatorList | |
![]() | length : uint The number of operators in the list.
| OperatorList | |
![]() | list : Array An array of the operators contained in the operator list.
| OperatorList | |
![]() | parameters : Object
Sets parameter values for this operator.
| OperatorList | |
![]() | visualization : Visualization
The visualization processed by this operator.
| OperatorList | |
| Method | Defined by | ||
|---|---|---|---|
|
OperatorSwitch(... ops)
Creates a new OperatorSwitch.
| OperatorSwitch | ||
![]() |
Adds an operator to the end of this list.
| OperatorList | |
![]() |
clear():void
Removes all operators from this list.
| OperatorList | |
![]() |
getOperatorAt(i:uint):IOperator
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 | ||
![]() |
Removes an operator from this list.
| OperatorList | |
![]() |
removeOperatorAt(i:uint):IOperator
Removes the operator at the specified position in the list
| OperatorList | |
![]() |
Set the operator at the specified position in the list
| OperatorList | |
![]() |
setup():void
Setup method invoked whenever this operator's visualization
property is set.
| OperatorList | |
| index | property |
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.
public function get index():int
public function set index(value:int):void
| indexFunction | property |
public var indexFunction:Function = nullA 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.
| OperatorSwitch | () | constructor |
public function OperatorSwitch(... ops)Creates a new OperatorSwitch.
Parameters... ops — an ordered set of operators to include in the switch.
|
| operate | () | method |
public override function operate(t:Transitioner = null):voidPerforms an operation over the contents of a visualization.
Parameterst:Transitioner (default = null) — a Transitioner instance for collecting value updates.
|