Packageflexlib.css
Classpublic dynamic class CSSPropertyInjector
InheritanceCSSPropertyInjector Inheritance 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
 PropertyDefined 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
 PropertyDefined 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
 MethodDefined By
  
Constructor.
CSSPropertyInjector
  
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
 MethodDefined By
  
applyStyles(state:String = null):void
CSSPropertyInjector
  
assignStylesToTarget(target:Object, state:String = null, styles:Dictionary = null):void
CSSPropertyInjector
  
CSSPropertyInjector
  
CSSPropertyInjector
  
createAggregateMapping(cssStyleDeclarations:Array):Dictionary
CSSPropertyInjector
  
getCSSStyleDeclaration(styleName:String):CSSStyleDeclaration
CSSPropertyInjector
  
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
 ConstantDefined By
  STYLENAME : String = styleName
[static]
CSSPropertyInjector
  STYLENAMES : String = styleNames
[static]
CSSPropertyInjector
  TARGET : String = target
[static]
CSSPropertyInjector
Property Detail
__aggregatePseudoMappingsproperty
protected var __aggregatePseudoMappings:Dictionary = null

__aggregateStylesproperty 
protected var __aggregateStyles:Dictionary = null

__cssStyleDeclarationsproperty 
protected var __cssStyleDeclarations:Array

__pseudoSelectorsproperty 
protected var __pseudoSelectors:Dictionary = null

__stateproperty 
protected var __state:String = null

__stateChangedproperty 
protected var __stateChanged:Boolean = false

__styleNameproperty 
protected var __styleName:String = null

__styleNameChangedproperty 
protected var __styleNameChanged:Boolean = false

__styleNamesproperty 
protected var __styleNames:Array = null

__styleNamesChangedproperty 
protected var __styleNamesChanged:Boolean = false

__targetproperty 
protected var __target:Object = null

__targetChangedproperty 
protected var __targetChanged:Boolean = false

__targetsproperty 
protected var __targets:Array = null

__targetsChangedproperty 
protected var __targetsChanged:Boolean = false

dispatcherproperty 
protected static var dispatcher:EventDispatcher = null

stateproperty 
state:String

The target object to apply the CSS values to.


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

The style name of the CSSDeclaration to inject from.


Implementation
    public function get styleName():String
    public function set styleName(value:String):void
styleNamesproperty 
styleNames:Object

The style names of the CSSDeclarations to inject from.


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

The target object to apply the CSS values to.


Implementation
    public function get target():Object
    public function set target(value:Object):void
targetsproperty 
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
STYLENAMEConstant
protected static const STYLENAME:String = styleName

STYLENAMESConstant 
protected static const STYLENAMES:String = styleNames

TARGETConstant 
protected static const TARGET:String = target