Packageorg.juicekit.util.helper
Classpublic final class CSSUtil

The CSSUtil class provides a set of static helper functions for manipulating CSS styles.



Public Methods
 MethodDefined by
  
isEmbeddedFont(tf:TextFormat):Boolean
[static] Returns true when the font glyph outlines for a given TextFormat are embedded in the SWF.
CSSUtil
  
setDefaultsFor(selector:String, defaults:Object):CSSStyleDeclaration
[static] Sets the style property defaults for a style selector.
CSSUtil
  
setStyleFor(selector:String, values:Object):CSSStyleDeclaration
[static] Sets the style properties for a specific style selector.
CSSUtil
Method detail
isEmbeddedFont()method
public static function isEmbeddedFont(tf:TextFormat):Boolean

Returns true when the font glyph outlines for a given TextFormat are embedded in the SWF.

Parameters
tf:TextFormat — Is the TextFormat to check.

Returns
Boolean — Returns true if an embedded font exists.
setDefaultsFor()method 
public static function setDefaultsFor(selector:String, defaults:Object):CSSStyleDeclaration

Sets the style property defaults for a style selector. If the properties already exist, the default specified for that property is ignored.

Parameters
selector:String — Is a string name of the selector for attaching the following default style properties.
 
defaults:Object — Is a simple dictionary object with keys (properties) matching desired style property names and values holding the style properties' respective initial values.

Example object literal: { strokeColor: 0xCCCCCC, fillColor: 0xCCCCCC }

Returns
CSSStyleDeclaration — Returns the CSSStyleDeclaration associated with the style selector.
setStyleFor()method 
public static function setStyleFor(selector:String, values:Object):CSSStyleDeclaration

Sets the style properties for a specific style selector.

Parameters
selector:String — Is the string name of a style selector.
 
values:Object — Is a simple dictionary object with keys (properties) matching desired style property names and values holding the style properties' respective values.

Example object literal: { strokeColor: 0xCCCCCC, fillColor: 0xCCCCCC }

Returns
CSSStyleDeclaration — Returns the CSSStyleDeclaration associated with the style selector.