The IValuesImpl interface is the basic interface for the subsystem that
provides default values to components. The most common implementation implements
a simple version of CSS and uses data structures compiled from CSS files.
Returns a new instance based on the value for a given object based on a property name,
and optionally, the current state, and a set of property value pairs.
Converts an HTML-like style format into an object.
IValuesImpl
Method Detail
addRule
()
method
public function addRule(ruleName:String, values:Object):void
Language Version :
ActionScript 3.0
Product Version :
FlexJS 0.0
Runtime Versions :
Flash Player 10.2, AIR 2.6
Add a style rule like a class selector.
Parameters
ruleName:String — The name of the rule like '.myClassSelector'.
values:Object — Name/value pairs.
convertColor
()
method
public function convertColor(value:Object):uint
Language Version :
ActionScript 3.0
Product Version :
FlexJS 0.0
Runtime Versions :
Flash Player 10.2, AIR 2.6
Converts a color value into a uint.
Parameters
value:Object — A string for a color. Typically it is
a color value like #ffffff or "red" in some cases.
Returns
uint
getInstance
()
method
public function getInstance(valueName:String):Object
Language Version :
ActionScript 3.0
Product Version :
FlexJS 0.0
Runtime Versions :
Flash Player 10.2, AIR 2.6
Returns a shared instance, instantiating the shared instance if
it doesn't exist. Often used to share "managers"
Parameters
valueName:String — The name of a shared instance. Often, the fully
qualified class name is used.
Returns
Object — The shared instance.
getValue
()
method
public function getValue(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
Language Version :
ActionScript 3.0
Product Version :
FlexJS 0.0
Runtime Versions :
Flash Player 10.2, AIR 2.6
Returns a value for a given object based on a property name,
and optionally, the current state, and a set of property value pairs.
Parameters
thisObject:Object — The object to get the value for.
valueName:String — The name of a property. e.g. fontFamily, color, etc.
state:String (default = null) — The name of a state. e.g. hovered, visited
attrs:Object (default = null) — A map of property value pairs that may affect the returned value.
Returns
* — A value or undefined
init
()
method
public function init(mainClass:Object):void
Language Version :
ActionScript 3.0
Product Version :
FlexJS 0.0
Runtime Versions :
Flash Player 10.2, AIR 2.6
MXML Documents that support <fx:Style> blocks should call
init to install the styles for each instance.
Parameters
mainClass:Object — An instance that may have styles from an <fx:Style> block.
newInstance
()
method
public function newInstance(thisObject:Object, valueName:String, state:String = null, attrs:Object = null):*
Language Version :
ActionScript 3.0
Product Version :
FlexJS 0.0
Runtime Versions :
Flash Player 10.2, AIR 2.6
Returns a new instance based on the value for a given object based on a property name,
and optionally, the current state, and a set of property value pairs. This is a way
to avoid using the Class type in AS code.
Parameters
thisObject:Object — The object to get the value for.
valueName:String — The name of a property. e.g. fontFamily, color, etc.
state:String (default = null) — The name of a state. e.g. hovered, visited
attrs:Object (default = null) — A map of property value pairs that may affect the returned value.
Returns
* — A value or undefined
parseStyles
()
method
public function parseStyles(value:String):Object
Language Version :
ActionScript 3.0
Product Version :
FlexJS 0.0
Runtime Versions :
Flash Player 10.2, AIR 2.6
Converts an HTML-like style format into an object.
Parameters
value:String — A string, such as "color:red;fontSize:10px".