Package | mx.styles |
Class | public class StyleProxy |
Inheritance | StyleProxy ![]() |
Implements | IStyleClient |
filterMap
property that contains style-source/style-destination pairs.
See also
Property | Defined By | ||
---|---|---|---|
className : String [read-only]
The name of the component class. | StyleProxy | ||
![]() | constructor : Object
A reference to the class object or constructor function for a given object instance. | Object | |
filterMap : Object
A set of string pairs. | StyleProxy | ||
inheritingStyles : Object
An object containing the inheritable styles for this component. | StyleProxy | ||
nonInheritingStyles : Object
An object containing the noninheritable styles for this component. | StyleProxy | ||
![]() | prototype : Object [static]
A reference to the prototype object of a class or function object. | Object | |
source : IStyleClient
The object that implements the IStyleClient interface. | StyleProxy | ||
styleDeclaration : CSSStyleDeclaration
The style declaration used by this object. | StyleProxy | ||
styleName : Object
The source of this object's style values. | StyleProxy |
Method | Defined By | ||
---|---|---|---|
Constructor. | StyleProxy | ||
Deletes a style property from this component instance. | StyleProxy | ||
Returns an Array of CSSStyleDeclaration objects for the type selector
that applies to this component, or null if none exist. | StyleProxy | ||
Gets a style property that has been set anywhere in this
component's style lookup chain. | StyleProxy | ||
![]() |
Indicates whether an object has a specified property defined. | Object | |
![]() |
Indicates whether an instance of the Object class is in the prototype chain of the object specified
as the parameter. | Object | |
Propagates style changes to the children of this component. | StyleProxy | ||
![]() |
Indicates whether the specified property exists and is enumerable. | Object | |
Sets up the internal style cache values so that the getStyle()
method functions. | StyleProxy | ||
Registers the EffectManager as one of the event listeners for each effect event. | StyleProxy | ||
![]() |
Sets the availability of a dynamic property for loop operations. | Object | |
Sets a style property on this component instance. | StyleProxy | ||
Called when the value of a style property is changed. | StyleProxy | ||
![]() |
Returns the string representation of this object, formatted according to locale-specific conventions. | Object | |
![]() |
Returns the string representation of the specified object. | Object | |
![]() |
Returns the primitive value of the specified object. | Object |
className | property |
className:String
[read-only] The name of the component class.
public function get className():String
filterMap | property |
filterMap:Object
A set of string pairs. The first item of the string pair is the name of the style in the source component. The second item of the String pair is the name of the style in the subcomponent. With this object, you can map a particular style in the parent component to a different style in the subcomponent. This is useful if both the parent component and the subcomponent share the same style, but you want to be able to control the values seperately.
public function get filterMap():Object
public function set filterMap(value:Object):void
inheritingStyles | property |
inheritingStyles:Object
An object containing the inheritable styles for this component.
public function get inheritingStyles():Object
public function set inheritingStyles(value:Object):void
nonInheritingStyles | property |
nonInheritingStyles:Object
An object containing the noninheritable styles for this component.
public function get nonInheritingStyles():Object
public function set nonInheritingStyles(value:Object):void
source | property |
source:IStyleClient
The object that implements the IStyleClient interface. This is the object that is being proxied.
public function get source():IStyleClient
public function set source(value:IStyleClient):void
styleDeclaration | property |
styleDeclaration:CSSStyleDeclaration
The style declaration used by this object.
public function get styleDeclaration():CSSStyleDeclaration
public function set styleDeclaration(value:CSSStyleDeclaration):void
styleName | property |
styleName:Object
The source of this object's style values.
The value of the styleName
property can be one of three possible types:
StyleManager.getStyleDeclaration(".headerStyle")
. public function get styleName():Object
public function set styleName(value:Object):void
StyleProxy | () | Constructor |
public function StyleProxy(source:IStyleClient, filterMap:Object)
Constructor.
Parameterssource:IStyleClient — The object that implements the IStyleClient interface.
| |
filterMap:Object — The set of styles to pass from the source to the subcomponent.
|
clearStyle | () | method |
public function clearStyle(styleProp:String):void
Deletes a style property from this component instance.
This does not necessarily cause the getStyle()
method to return
undefined
.
Parameters
styleProp:String — Name of the style property.
|
getClassStyleDeclarations | () | method |
public function getClassStyleDeclarations():Array
Returns an Array of CSSStyleDeclaration objects for the type selector
that applies to this component, or null
if none exist.
For example, suppose that component MyButton extends Button. This method first looks for a MyButton selector; then, it looks for a Button type selector; finally, it looks for a UIComponent type selector.
ReturnsArray — Array of CSSStyleDeclaration objects.
|
getStyle | () | method |
public function getStyle(styleProp:String):*
Gets a style property that has been set anywhere in this component's style lookup chain.
This same method is used to get any kind of style property, so the value returned may be a Boolean, String, Number, int, uint (for an RGB color), Class (for a skin), or any kind of object. Therefore the return type is specified as *.
If you are getting a particular style property, you will
know its type and will often want to store the result in a
variable of that type. You can use either the as
operator or coercion to do this. For example:
var backgroundColor:uint = getStyle("backgroundColor") as int; or var backgroundColor:uint = int(getStyle("backgroundColor"));
If the style property has not been set anywhere in the
style lookup chain, the value returned by the getStyle()
method
is undefined
.
Note that undefined
is a special value that is
not the same as false
, the empty String (""
),
NaN
, 0, or null
.
No valid style value is ever undefined
.
You can use the static method
StyleManager.isValidStyleValue()
to test whether the value was set.
Parameters
styleProp:String — Name of the style property.
|
* — Style value.
|
notifyStyleChangeInChildren | () | method |
public function notifyStyleChangeInChildren(styleProp:String, recursive:Boolean):void
Propagates style changes to the children of this component.
Parameters
styleProp:String — Name of the style property.
| |
recursive:Boolean — Whether to propagate the style changes to the children's children.
|
regenerateStyleCache | () | method |
public function regenerateStyleCache(recursive:Boolean):void
Sets up the internal style cache values so that the getStyle()
method functions.
If this object already has children, then reinitialize the children's
style caches.
Parameters
recursive:Boolean — Regenerate the proto chains of the children.
|
registerEffects | () | method |
public function registerEffects(effects:Array):void
Registers the EffectManager as one of the event listeners for each effect event.
Parameters
effects:Array — An Array of Strings of effect names.
|
setStyle | () | method |
public function setStyle(styleProp:String, newValue:*):void
Sets a style property on this component instance.
This may override a style that was set globally.
Calling the setStyle()
method can result in decreased performance.
Use it only when necessary.
Parameters
styleProp:String — Name of the style property.
| |
newValue:* — New value for the style.
|
styleChanged | () | method |
public function styleChanged(styleProp:String):void
Called when the value of a style property is changed.
Parameters
styleProp:String — The name of the style property that changed.
|