Packagefeathers.skins
Classpublic class FunctionStyleProvider
InheritanceFunctionStyleProvider Inheritance Object
Implements IStyleProvider

Product Version : Feathers 2.0.0

Sets styles on a Feathers UI component by passing the component to a function when the style provider's applyStyles() is called.

In the following example, a FunctionStyleProvider is created:

var button:Button = new Button();
button.label = "Click Me";
button.styleProvider = new FunctionStyleProvider( function( target:Button ):void
{
    target.defaultSkin = new Image( texture );
    // set other styles...
});
this.addChild( button );

See also

Skinning Feathers components


Public Properties
 PropertyDefined By
  styleFunction : Function
The target Feathers UI component is passed to this function when applyStyles() is called.
FunctionStyleProvider
Public Methods
 MethodDefined By
  
FunctionStyleProvider(skinFunction:Function)
Constructor.
FunctionStyleProvider
  
Applies styles to a specific Feathers UI component, unless that component has been excluded.
FunctionStyleProvider
Property Detail
styleFunctionproperty
styleFunction:Function

The target Feathers UI component is passed to this function when applyStyles() is called.

The function is expected to have the following signature:

function( item:IFeathersControl ):void


Implementation
    public function get styleFunction():Function
    public function set styleFunction(value:Function):void
Constructor Detail
FunctionStyleProvider()Constructor
public function FunctionStyleProvider(skinFunction:Function)

Constructor.

Parameters
skinFunction:Function
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