Packagefeathers.skins
Classpublic class StateWithToggleValueSelector
InheritanceStateWithToggleValueSelector Inheritance Object
Subclasses ImageStateValueSelector, Scale9ImageStateValueSelector, SmartDisplayObjectStateValueSelector

Maps a component's states to values, perhaps for one of the component's properties such as a skin or text format.



Public Properties
 PropertyDefined By
  defaultSelectedValue : Object
If the target is a selected IToggle instance, and if there is no value for the specified state, a default value may be used as a fallback (with a higher priority than the regular default fallback).
StateWithToggleValueSelector
  defaultValue : Object
If there is no value for the specified state, a default value can be used as a fallback.
StateWithToggleValueSelector
Public Methods
 MethodDefined By
  
Constructor.
StateWithToggleValueSelector
  
clearValueForState(state:Object, isSelected:Boolean = false):Object
Clears the value stored for a specific state.
StateWithToggleValueSelector
  
getValueForState(state:Object, isSelected:Boolean = false):Object
Returns the value stored for a specific state.
StateWithToggleValueSelector
  
setValueForState(value:Object, state:Object, isSelected:Boolean = false):void
Stores a value for a specified state to be returned from getValueForState().
StateWithToggleValueSelector
  
updateValue(target:Object, state:Object, oldValue:Object = null):Object
Returns the value stored for a specific state.
StateWithToggleValueSelector
Property Detail
defaultSelectedValueproperty
public var defaultSelectedValue:Object

If the target is a selected IToggle instance, and if there is no value for the specified state, a default value may be used as a fallback (with a higher priority than the regular default fallback).

See also

defaultValueproperty 
public var defaultValue:Object

If there is no value for the specified state, a default value can be used as a fallback.

Constructor Detail
StateWithToggleValueSelector()Constructor
public function StateWithToggleValueSelector()

Constructor.

Method Detail
clearValueForState()method
public function clearValueForState(state:Object, isSelected:Boolean = false):Object

Clears the value stored for a specific state.

Parameters

state:Object
 
isSelected:Boolean (default = false)

Returns
Object
getValueForState()method 
public function getValueForState(state:Object, isSelected:Boolean = false):Object

Returns the value stored for a specific state.

Parameters

state:Object
 
isSelected:Boolean (default = false)

Returns
Object
setValueForState()method 
public function setValueForState(value:Object, state:Object, isSelected:Boolean = false):void

Stores a value for a specified state to be returned from getValueForState().

Parameters

value:Object
 
state:Object
 
isSelected:Boolean (default = false)

updateValue()method 
public function updateValue(target:Object, state:Object, oldValue:Object = null):Object

Returns the value stored for a specific state. May generate a value, if none is present.

Parameters

target:Object — The object receiving the stored value. The manager may query properties on the target to customize the returned value.
 
state:Object — The current state.
 
oldValue:Object (default = null) — The previous value. May be reused for the new value.

Returns
Object