Packagefeathers.skins
Classpublic class AddOnFunctionStyleProvider
InheritanceAddOnFunctionStyleProvider Inheritance Object
Implements IStyleProvider

Product Version : Feathers 2.0.0

Wraps an existing style provider to call an additional function before or after the existing style provider applies its styles.

Starting with Feathers 3.1, "style" properties that are set outside a style provider won't be replaced by the style provider, so AddOnFunctionStyleProvider may only be useful in rare cases.

Expected usage is to replace a component's existing style provider:

var button:Button = new Button();
button.label = "Click Me";
function setExtraStyles( target:Button ):void
{
    target.defaultIcon = new Image( texture );
    // set other styles, if desired...
}
button.styleProvider = new AddOnFunctionStyleProvider( button.styleProvider, setExtraStyles );
this.addChild( button );



Public Properties
 PropertyDefined By
  addOnFunction : Function
A function to call after applying the original style provider's styles.
AddOnFunctionStyleProvider
  callBeforeOriginalStyleProvider : Boolean
Determines if the add on function should be called before the original style provider is applied, or after.
AddOnFunctionStyleProvider
  originalStyleProvider : IStyleProvider
The addOnFunction will be called after the original style provider applies its styles.
AddOnFunctionStyleProvider
Public Methods
 MethodDefined By
  
AddOnFunctionStyleProvider(originalStyleProvider:IStyleProvider = null, addOnFunction:Function = null)
Constructor.
AddOnFunctionStyleProvider
  
Applies styles to a specific Feathers UI component, unless that component has been excluded.
AddOnFunctionStyleProvider
Property Detail
addOnFunctionproperty
addOnFunction:Function

A function to call after applying the original style provider's styles.

The function is expected to have the following signature:

function( item:IFeathersControl ):void


Implementation
    public function get addOnFunction():Function
    public function set addOnFunction(value:Function):void
callBeforeOriginalStyleProviderproperty 
callBeforeOriginalStyleProvider:Boolean

Determines if the add on function should be called before the original style provider is applied, or after.

The default value is false.


Implementation
    public function get callBeforeOriginalStyleProvider():Boolean
    public function set callBeforeOriginalStyleProvider(value:Boolean):void
originalStyleProviderproperty 
originalStyleProvider:IStyleProvider

The addOnFunction will be called after the original style provider applies its styles.


Implementation
    public function get originalStyleProvider():IStyleProvider
    public function set originalStyleProvider(value:IStyleProvider):void
Constructor Detail
AddOnFunctionStyleProvider()Constructor
public function AddOnFunctionStyleProvider(originalStyleProvider:IStyleProvider = null, addOnFunction:Function = null)

Constructor.

Parameters
originalStyleProvider:IStyleProvider (default = null)
 
addOnFunction:Function (default = null)
Method Detail
applyStyles()method
public function applyStyles(target:IFeathersControl):void

Applies styles to a specific Feathers UI component, unless that component has been excluded.

Parameters

target:IFeathersControl