GODPAPER | All Packages | All Classes | Index | Frames No Frames |
StateValueSelector

Package | feathers.skins
Class | public class StateValueSelector
Inheritance | StateValueSelector Object

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

Public Properties

| Property | Defined By
--- | --- | ---
|  | defaultValue : Object If there is no value for the specified state, a default value can be used as a fallback. | StateValueSelector

Public Methods

| Method | Defined By
--- | --- | ---
|  | StateValueSelector() Constructor. | StateValueSelector
|  | clearValueForState(state:Object):Object Clears the value stored for a specific state. | StateValueSelector
|  | getValueForState(state:Object):Object Returns the value stored for a specific state. | StateValueSelector
|  | setValueForState(value:Object, state:Object):void Stores a value for a specified state to be returned from getValueForState(). | StateValueSelector
|  | updateValue(target:Object, state:Object, oldValue:Object = null):Object Returns the value stored for a specific state. | StateValueSelector

Property Detail

defaultValue | property

`public var defaultValue:Object`

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

Constructor Detail

StateValueSelector | () | Constructor

`public function StateValueSelector()`

Constructor.

Method Detail

clearValueForState | () | method

`public function clearValueForState(state:Object):Object`

Clears the value stored for a specific state.

Parameters

| `state:Object`

Returns

| `Object`

getValueForState | () | method |

`public function getValueForState(state:Object):Object`

Returns the value stored for a specific state.

Parameters

| `state:Object`

Returns

| `Object`

setValueForState | () | method |

`public function setValueForState(value:Object, state:Object):void`

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

Parameters

| `value:Object`
| `state:Object`

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`

Thu Jan 16 2014, 01:11 PM +08:00