flexlib :: library Documentation | All Packages | All Classes | Index | Frames No Frames |
CSSPropertyInjector

Package | flexlib.css
Class | public dynamic class CSSPropertyInjector
Inheritance | CSSPropertyInjector Object

A utility to dynamically inject values from CSSStyleDeclarations into a target object. NOTE: This code is being developed and has not be thoroughly tested... Also, changes to a CSSStyleDeclaration are not being handled

Public Properties

| Property | Defined By
--- | --- | ---
|  | state : String The target object to apply the CSS values to. | CSSPropertyInjector
|  | styleName : String The style name of the CSSDeclaration to inject from. | CSSPropertyInjector
|  | styleNames : Object The style names of the CSSDeclarations to inject from. | CSSPropertyInjector
|  | target : Object The target object to apply the CSS values to. | CSSPropertyInjector
|  | targets : Array The target objects to apply the CSS values to. | CSSPropertyInjector

Protected Properties

| Property | Defined By
--- | --- | ---
|  | __aggregatePseudoMappings : Dictionary = null | CSSPropertyInjector
|  | __aggregateStyles : Dictionary = null | CSSPropertyInjector
|  | __cssStyleDeclarations : Array | CSSPropertyInjector
|  | dispatcher : EventDispatcher = null [static] | CSSPropertyInjector
|  | __pseudoSelectors : Dictionary = null | CSSPropertyInjector
|  | __state : String = null | CSSPropertyInjector
|  | __stateChanged : Boolean = false | CSSPropertyInjector
|  | __styleName : String = null | CSSPropertyInjector
|  | __styleNameChanged : Boolean = false | CSSPropertyInjector
|  | __styleNames : Array = null | CSSPropertyInjector
|  | __styleNamesChanged : Boolean = false | CSSPropertyInjector
|  | __target : Object = null | CSSPropertyInjector
|  | __targetChanged : Boolean = false | CSSPropertyInjector
|  | __targets : Array = null | CSSPropertyInjector
|  | __targetsChanged : Boolean = false | CSSPropertyInjector

Public Methods

| Method | Defined By
--- | --- | ---
|  | CSSPropertyInjector() Constructor. | CSSPropertyInjector
|  | invalidateProperties():void Added to adhere to the framework lifecycle naming convention. | CSSPropertyInjector
|  | loadStyleDeclarations(url:String, update:Boolean = false, trustContent:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null):IEventDispatcher [static] | CSSPropertyInjector

Protected Methods

| Method | Defined By
--- | --- | ---
|  | applyStyles(state:String = null):void | CSSPropertyInjector
|  | assignStylesToTarget(target:Object, state:String = null, styles:Dictionary = null):void | CSSPropertyInjector
|  | buildAggregateMappings():void | CSSPropertyInjector
|  | commitProperties():void | CSSPropertyInjector
|  | createAggregateMapping(cssStyleDeclarations:Array):Dictionary | CSSPropertyInjector
|  | getCSSStyleDeclaration(styleName:String):CSSStyleDeclaration | CSSPropertyInjector
|  | getCSSStyleDeclarations():void | CSSPropertyInjector
|  | getStyles(cssStyleDeclaration:CSSStyleDeclaration, arr:Array = null):Array | CSSPropertyInjector
|  | handleCurrentStateChange(event:StateChangeEvent):void | CSSPropertyInjector
|  | handleStyleEventComplete(event:StyleEvent):void | CSSPropertyInjector
|  | handleStyleEventComplete(event:StyleEvent):void [static] | CSSPropertyInjector

Protected Constants

| Constant | Defined By
--- | --- | ---
|  | STYLENAME : String = styleName [static] | CSSPropertyInjector
|  | STYLENAMES : String = styleNames [static] | CSSPropertyInjector
|  | TARGET : String = target [static] | CSSPropertyInjector

Property Detail

__aggregatePseudoMappings | property

`protected var __aggregatePseudoMappings:Dictionary = null`

__aggregateStyles | property |

`protected var __aggregateStyles:Dictionary = null`

__cssStyleDeclarations | property |

`protected var __cssStyleDeclarations:Array`

__pseudoSelectors | property |

`protected var __pseudoSelectors:Dictionary = null`

__state | property |

`protected var __state:String = null`

__stateChanged | property |

`protected var __stateChanged:Boolean = false`

__styleName | property |

`protected var __styleName:String = null`

__styleNameChanged | property |

`protected var __styleNameChanged:Boolean = false`

__styleNames | property |

`protected var __styleNames:Array = null`

__styleNamesChanged | property |

`protected var __styleNamesChanged:Boolean = false`

__target | property |

`protected var __target:Object = null`

__targetChanged | property |

`protected var __targetChanged:Boolean = false`

__targets | property |

`protected var __targets:Array = null`

__targetsChanged | property |

`protected var __targetsChanged:Boolean = false`

dispatcher | property |

`protected static var dispatcher:EventDispatcher = null`

state | property |

`state:String`

The target object to apply the CSS values to.

Implementation
`public function get state():String`
`public function set state(value:String):void`

styleName | property |

`styleName:String`

The style name of the CSSDeclaration to inject from.

Implementation
`public function get styleName():String`
`public function set styleName(value:String):void`

styleNames | property |

`styleNames:Object`

The style names of the CSSDeclarations to inject from.

Implementation
`public function get styleNames():Object`
`public function set styleNames(value:Object):void`

target | property |

`target:Object`

The target object to apply the CSS values to.

Implementation
`public function get target():Object`
`public function set target(value:Object):void`

targets | property |

`targets:Array`

The target objects to apply the CSS values to.

Implementation
`public function get targets():Array`
`public function set targets(value:Array):void`
Constructor Detail

CSSPropertyInjector | () | Constructor

`public function CSSPropertyInjector()`

Constructor.

Method Detail

applyStyles | () | method

`protected function applyStyles(state:String = null):void`

Parameters

| `state:String` (default = `null`)``

assignStylesToTarget | () | method |

`protected function assignStylesToTarget(target:Object, state:String = null, styles:Dictionary = null):void`

Parameters

| `target:Object`
| `state:String` (default = `null`)``
| `styles:Dictionary` (default = `null`)``

buildAggregateMappings | () | method |

`protected function buildAggregateMappings():void`

commitProperties | () | method |

`protected function commitProperties():void`

createAggregateMapping | () | method |

`protected function createAggregateMapping(cssStyleDeclarations:Array):Dictionary`

Parameters

| `cssStyleDeclarations:Array`

Returns

| `Dictionary`

getCSSStyleDeclaration | () | method |

`protected function getCSSStyleDeclaration(styleName:String):CSSStyleDeclaration`

Parameters

| `styleName:String`

Returns

| `CSSStyleDeclaration`

getCSSStyleDeclarations | () | method |

`protected function getCSSStyleDeclarations():void`

getStyles | () | method |

`protected function getStyles(cssStyleDeclaration:CSSStyleDeclaration, arr:Array = null):Array`

Parameters

| `cssStyleDeclaration:CSSStyleDeclaration`
| `arr:Array` (default = `null`)``

Returns

| `Array`

handleCurrentStateChange | () | method |

`protected function handleCurrentStateChange(event:StateChangeEvent):void`

Parameters

| `event:StateChangeEvent`

handleStyleEventComplete | () | method |

`protected function handleStyleEventComplete(event:StyleEvent):void`

Parameters

| `event:StyleEvent`

handleStyleEventComplete | () | method |

`protected static function handleStyleEventComplete(event:StyleEvent):void`

Parameters

| `event:StyleEvent`

invalidateProperties | () | method |

`public function invalidateProperties():void`

Added to adhere to the framework lifecycle naming convention. Just calls commitProperties().

loadStyleDeclarations | () | method |

`public static function loadStyleDeclarations(url:String, update:Boolean = false, trustContent:Boolean = false, applicationDomain:ApplicationDomain = null, securityDomain:SecurityDomain = null):IEventDispatcher`

Parameters

| `url:String`
| `update:Boolean` (default = `false`)``
| `trustContent:Boolean` (default = `false`)``
| `applicationDomain:ApplicationDomain` (default = `null`)``
| `securityDomain:SecurityDomain` (default = `null`)``

Returns

| `IEventDispatcher`

Constant Detail

STYLENAME | Constant

`protected static const STYLENAME:String = styleName`

STYLENAMES | Constant |

`protected static const STYLENAMES:String = styleNames`

TARGET | Constant |

`protected static const TARGET:String = target`

Dimanche Juin 19 2011, 03:12 PM +02:00