Package | feathers.skins |
Class | public class StyleProviderRegistry |
Inheritance | StyleProviderRegistry ![]() |
Method | Defined By | ||
---|---|---|---|
StyleProviderRegistry(registerGlobally:Boolean = true, styleProviderFactory:Function = null)
Constructor. | StyleProviderRegistry | ||
clearStyleProvider(forClass:Class):void
Removes the style provider for the specified component class. | StyleProviderRegistry | ||
dispose():void
Disposes the theme. | StyleProviderRegistry | ||
getStyleProvider(forClass:Class):IStyleProvider
Creates an IStyleProvider for the specified component
class, or if it was already created, returns the existing registered
style provider. | StyleProviderRegistry |
StyleProviderRegistry | () | Constructor |
public function StyleProviderRegistry(registerGlobally:Boolean = true, styleProviderFactory:Function = null)
Constructor.
If style providers are to be registered globally, they will be
passed to the static globalStyleProvider
property of the
specified class. If the class does not define a
globalStyleProvider
property, an error will be thrown.
The style provider factory function is expected to have the following signature:
function():IStyleProviderParameters
registerGlobally:Boolean (default = true ) — Determines if the registry sets the static globalStyleProvider property.
| |
styleProviderFactory:Function (default = null ) — An optional function that creates a new style provider. If null , a StyleNameFunctionStyleProvider will be created.
|
clearStyleProvider | () | method |
public function clearStyleProvider(forClass:Class):void
Removes the style provider for the specified component class. If the
registry is global, and the static globalStyleProvider
property contains the same value, it will be set to null
.
If it contains a different value, then it will be left unchanged to
avoid conflicts with other registries or code.
Parameters
forClass:Class — The style provider is registered for this class.
|
dispose | () | method |
public function dispose():void
Disposes the theme.
getStyleProvider | () | method |
public function getStyleProvider(forClass:Class):IStyleProvider
Creates an IStyleProvider
for the specified component
class, or if it was already created, returns the existing registered
style provider. If the registry is global, a newly created style
provider will be passed to the static globalStyleProvider
property of the specified class.
Parameters
forClass:Class — The style provider is registered for this class.
|
IStyleProvider |