Packagefeathers.skins
Classpublic class SmartDisplayObjectStateValueSelector
InheritanceSmartDisplayObjectStateValueSelector Inheritance StateWithToggleValueSelector Inheritance Object

Values for each state are textures or colors, and the manager attempts to reuse the existing display object that is passed in to getValueForState() as the old value, if possible. Supports Image and Texture, Scale3Image and Scale3Textures, Scale9Image and Scale9Textures, or Quad and uint (color) value.

Additional value type handlers may be added, or the default type handlers may be replaced.



Public Properties
 PropertyDefined By
 InheriteddefaultSelectedValue : 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
 InheriteddefaultValue : Object
If there is no value for the specified state, a default value can be used as a fallback.
StateWithToggleValueSelector
  displayObjectProperties : Object
Optional properties to set on the Scale9Image instance.
SmartDisplayObjectStateValueSelector
Public Methods
 MethodDefined By
  
Constructor.
SmartDisplayObjectStateValueSelector
 Inherited
clearValueForState(state:Object, isSelected:Boolean = false):Object
Clears the value stored for a specific state.
StateWithToggleValueSelector
  
clearValueTypeHandler(type:Class):void
Clears a value type handler.
SmartDisplayObjectStateValueSelector
 Inherited
getValueForState(state:Object, isSelected:Boolean = false):Object
Returns the value stored for a specific state.
StateWithToggleValueSelector
  
getValueTypeHandler(type:Class):Function
Returns the function that handles updating a value of a specific type.
SmartDisplayObjectStateValueSelector
  
scale3TextureValueTypeHandler(value:Scale3Textures, oldDisplayObject:DisplayObject = null):DisplayObject
[static] The value type handler for type feathers.textures.Scale3Textures.
SmartDisplayObjectStateValueSelector
  
scale9TextureValueTypeHandler(value:Scale9Textures, oldDisplayObject:DisplayObject = null):DisplayObject
[static] The value type handler for type feathers.textures.Scale9Textures.
SmartDisplayObjectStateValueSelector
 Inherited
setValueForState(value:Object, state:Object, isSelected:Boolean = false):void
Stores a value for a specified state to be returned from getValueForState().
StateWithToggleValueSelector
  
setValueTypeHandler(type:Class, handler:Function):void
Sets a function to handle updating a value of a specific type.
SmartDisplayObjectStateValueSelector
  
textureValueTypeHandler(value:Texture, oldDisplayObject:DisplayObject = null):DisplayObject
[static] The value type handler for type starling.textures.Texture.
SmartDisplayObjectStateValueSelector
  
uintValueTypeHandler(value:uint, oldDisplayObject:DisplayObject = null):DisplayObject
[static] The value type handler for type uint (a color to display by a quad).
SmartDisplayObjectStateValueSelector
 Inherited
updateValue(target:Object, state:Object, oldValue:Object = null):Object
Returns the value stored for a specific state.
StateWithToggleValueSelector
Property Detail
displayObjectPropertiesproperty
displayObjectProperties:Object

Optional properties to set on the Scale9Image instance.


Implementation
    public function get displayObjectProperties():Object
    public function set displayObjectProperties(value:Object):void

See also

Constructor Detail
SmartDisplayObjectStateValueSelector()Constructor
public function SmartDisplayObjectStateValueSelector()

Constructor.

Method Detail
clearValueTypeHandler()method
public function clearValueTypeHandler(type:Class):void

Clears a value type handler.

Parameters

type:Class

getValueTypeHandler()method 
public function getValueTypeHandler(type:Class):Function

Returns the function that handles updating a value of a specific type.

Parameters

type:Class

Returns
Function
scale3TextureValueTypeHandler()method 
public static function scale3TextureValueTypeHandler(value:Scale3Textures, oldDisplayObject:DisplayObject = null):DisplayObject

The value type handler for type feathers.textures.Scale3Textures.

Parameters

value:Scale3Textures
 
oldDisplayObject:DisplayObject (default = null)

Returns
DisplayObject

See also

scale9TextureValueTypeHandler()method 
public static function scale9TextureValueTypeHandler(value:Scale9Textures, oldDisplayObject:DisplayObject = null):DisplayObject

The value type handler for type feathers.textures.Scale9Textures.

Parameters

value:Scale9Textures
 
oldDisplayObject:DisplayObject (default = null)

Returns
DisplayObject

See also

setValueTypeHandler()method 
public function setValueTypeHandler(type:Class, handler:Function):void

Sets a function to handle updating a value of a specific type. The function must have the following signature:

function(value:Object, oldDisplayObject:DisplayObject = null):DisplayObject

The oldDisplayObject is optional, and it may be of a type that is different than what the function will return. If the types do not match, the function should create a new object instead of reusing the old display object.

Parameters

type:Class
 
handler:Function

textureValueTypeHandler()method 
public static function textureValueTypeHandler(value:Texture, oldDisplayObject:DisplayObject = null):DisplayObject

The value type handler for type starling.textures.Texture.

Parameters

value:Texture
 
oldDisplayObject:DisplayObject (default = null)

Returns
DisplayObject

See also

uintValueTypeHandler()method 
public static function uintValueTypeHandler(value:uint, oldDisplayObject:DisplayObject = null):DisplayObject

The value type handler for type uint (a color to display by a quad).

Parameters

value:uint
 
oldDisplayObject:DisplayObject (default = null)

Returns
DisplayObject

See also