Package | feathers.skins |
Class | public class AddOnFunctionStyleProvider |
Inheritance | AddOnFunctionStyleProvider Object |
Implements | IStyleProvider |
Product Version : | Feathers 2.0.0 |
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 );
Property | Defined 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 |
Method | Defined By | ||
---|---|---|---|
AddOnFunctionStyleProvider(originalStyleProvider:IStyleProvider = null, addOnFunction:Function = null)
Constructor. | AddOnFunctionStyleProvider | ||
applyStyles(target:IFeathersControl):void
Applies styles to a specific Feathers UI component, unless that
component has been excluded. | AddOnFunctionStyleProvider |
addOnFunction | property |
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
public function get addOnFunction():Function
public function set addOnFunction(value:Function):void
callBeforeOriginalStyleProvider | property |
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
.
public function get callBeforeOriginalStyleProvider():Boolean
public function set callBeforeOriginalStyleProvider(value:Boolean):void
originalStyleProvider | property |
originalStyleProvider:IStyleProvider
The addOnFunction
will be called after the original
style provider applies its styles.
public function get originalStyleProvider():IStyleProvider
public function set originalStyleProvider(value:IStyleProvider):void
AddOnFunctionStyleProvider | () | Constructor |
public function AddOnFunctionStyleProvider(originalStyleProvider:IStyleProvider = null, addOnFunction:Function = null)
Constructor.
ParametersoriginalStyleProvider:IStyleProvider (default = null )
| |
addOnFunction:Function (default = null )
|
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 |