Apache Flex 4.16.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
IStyleManager2

Package | mx.styles
Interface | public interface IStyleManager2 extends IStyleManager

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

The IStyleManager2 class manages the following:

- Which CSS style properties the class inherits
- Which style properties are colors, and therefore get special handling
- A list of strings that are aliases for color values

See also

mx.styles.CSSStyleDeclaration

Public Properties

| Property | Defined By
--- | --- | ---
|  | parent : IStyleManager2 [read-only] The style manager that is the parent of this StyleManager. | IStyleManager2
|  | selectors : Array [read-only] Returns an Array of all the CSS selectors that are registered with the StyleManager. | IStyleManager2

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined By
--- | --- | ---
|  | clearStyleDeclaration(selector:String, update:Boolean):void Clears the CSSStyleDeclaration object that stores the rules for the specified CSS selector. | IStyleManager
|  | getColorName(colorName:Object):uint Returns the numeric RGB color value that corresponds to the specified color string. | IStyleManager
|  | getColorNames(colors:Array):void Converts each element of the colors Array from a color name to a numeric RGB color value. | IStyleManager
|  | getMergedStyleDeclaration(selector:String):CSSStyleDeclaration Gets a CSSStyleDeclaration object that stores the rules for the specified CSS selector. | IStyleManager2
|  | getStyleDeclaration(selector:String):CSSStyleDeclaration Gets the CSSStyleDeclaration object that stores the rules for the specified CSS selector. | IStyleManager
|  | isColorName(colorName:String):Boolean Tests to see if the given String is an alias for a color value. | IStyleManager
|  | isInheritingStyle(styleName:String):Boolean Tests to see if a style is inheriting. | IStyleManager
|  | isInheritingTextFormatStyle(styleName:String):Boolean Test to see if a TextFormat style is inheriting. | IStyleManager
|  | isParentDisplayListInvalidatingStyle(styleName:String):Boolean Tests to see if this style affects the component's parent container in such a way as to require that the parent container redraws itself when this style changes. | IStyleManager
|  | isParentSizeInvalidatingStyle(styleName:String):Boolean Tests to see if the style changes the size of the component's parent container. | IStyleManager
|  | isSizeInvalidatingStyle(styleName:String):Boolean Tests to see if a style changes the size of a component. | IStyleManager
|  | isValidStyleValue(value:*):Boolean Determines if a specified parameter is a valid style property. | IStyleManager
|  | loadStyleDeclarations(url:String, update:Boolean = true, trustContent:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null):IEventDispatcher Loads a style SWF. | IStyleManager
|  | registerColorName(colorName:String, colorValue:uint):void Adds a color name to the list of aliases for colors. | IStyleManager
|  | registerInheritingStyle(styleName:String):void Adds to the list of styles that can inherit values from their parents. | IStyleManager
|  | registerParentDisplayListInvalidatingStyle(styleName:String):void Adds to the list of styles which may affect the appearance or layout of the component's parent container. | IStyleManager
|  | registerParentSizeInvalidatingStyle(styleName:String):void Adds to the list of styles which may affect the measured size of the component's parent container. | IStyleManager
|  | registerSizeInvalidatingStyle(styleName:String):void Adds to the list of styles which may affect the measured size of the component. | IStyleManager
|  | setStyleDeclaration(selector:String, styleDeclaration:CSSStyleDeclaration, update:Boolean):void Sets the CSSStyleDeclaration object that stores the rules for the specified CSS selector. | IStyleManager
|  | unloadStyleDeclarations(url:String, update:Boolean = true):void Unloads a style SWF. | IStyleManager

Property Detail

parent | property

`parent:IStyleManager2` [read-only]

The style manager that is the parent of this StyleManager.

Implementation
`public function get parent():IStyleManager2`

selectors | property |

`selectors:Array` [read-only]

Language Version : | ActionScript 3.0

Product Version : | Flex 3

Runtime Versions : | Flash Player 9, AIR 1.1

Returns an Array of all the CSS selectors that are registered with the StyleManager. You can pass items in this Array to the `getStyleDeclaration()` method to get the corresponding CSSStyleDeclaration object. Class selectors are prepended with a period.

Implementation
`public function get selectors():Array`
Method Detail

getMergedStyleDeclaration | () | method

`public function getMergedStyleDeclaration(selector:String):CSSStyleDeclaration`

Language Version : | ActionScript 3.0

Product Version : | Flex 4

Runtime Versions : | Flash Player 10, AIR 1.5

Gets a CSSStyleDeclaration object that stores the rules for the specified CSS selector. The CSSStyleDeclaration object is created by merging the properties of the specified CSS selector in this style manager with the properties of any parent style managers.

If the `selector` parameter starts with a period (.), the returned CSSStyleDeclaration is a class selector and applies only to those instances whose `styleName` property specifies that selector (not including the period). For example, the class selector `".bigMargins"` applies to any UIComponent whose `styleName` is `"bigMargins"`.

If the `selector` parameter does not start with a period, the returned CSSStyleDeclaration is a type selector and applies to all instances of that type. For example, the type selector `"Button"` applies to all instances of Button and its subclasses.

The `global` selector is similar to a type selector and does not start with a period.

Parameters

| `selector:String` — The name of the CSS selector.

Returns

| `CSSStyleDeclaration` — The style declaration whose name matches the `selector` property.

Sun Mar 5 2017, 03:42 PM +11:00