Apache Flex (FlexJS) 0.7.0 API Reference | All Packages | All Classes | Index | Frames No Frames |
CSSUtils

Package | org.apache.flex.utils
Class | public class CSSUtils
Inheritance | CSSUtils Object

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The CSSUtils class is a collection of static functions that provide utility features for managing CSS values.

Public Properties

| Property | Defined By
--- | --- | ---
|  | colorMap : Object [static] The map of color names to uints. | CSSUtils

Public Methods

| Method | Defined By
--- | --- | ---
|  | attributeFromColor(value:uint):String [static] | CSSUtils
|  | getBottomValue(value:Object, values:Object, reference:Number):Number [static] Computes paddingBottom or marginBottom. | CSSUtils
|  | getLeftValue(value:Object, values:Object, reference:Number):Number [static] Computes paddingLeft or marginLeft. | CSSUtils
|  | getRightValue(value:Object, values:Object, reference:Number):Number [static] Computes paddingRight or marginRight. | CSSUtils
|  | getSideValue(value:Object, values:Object, side:int, reference:Number):Number [static] Computes padding or margin. | CSSUtils
|  | getTopValue(value:Object, values:Object, reference:Number):Number [static] Computes paddingTop or marginTop. | CSSUtils
|  | toColor(value:Object):uint [static] Converts a value describing a color to a uint | CSSUtils
|  | toColorWithAlpha(value:Object):uint [static] Converts a value describing a color and alpha in a uint | CSSUtils
|  | toNumber(str:String, reference:Number = 0):Number [static] Converts a String to number. | CSSUtils

Property Detail

colorMap | property

`public static var colorMap:Object`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

The map of color names to uints.

Method Detail

attributeFromColor | () | method

`public static function attributeFromColor(value:uint):String`

Parameters

| `value:uint`

Returns

| `String`

getBottomValue | () | method |

`public static function getBottomValue(value:Object, values:Object, reference:Number):Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Computes paddingBottom or marginBottom.

Parameters

| `value:Object` — The value of padding-bottom or margin-bottom.
| `values:Object` — The value of padding or margin.
| `reference:Number` (default = `NaN`)`` — A Number that will be used to convert percentages.

Returns

| `Number` — Number.

getLeftValue | () | method |

`public static function getLeftValue(value:Object, values:Object, reference:Number):Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Computes paddingLeft or marginLeft.

Parameters

| `value:Object` — The value of padding-left or margin-left.
| `values:Object` — The value of padding or margin.
| `reference:Number` (default = `NaN`)`` — A Number that will be used to convert percentages.

Returns

| `Number` — Number.

getRightValue | () | method |

`public static function getRightValue(value:Object, values:Object, reference:Number):Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Computes paddingRight or marginRight.

Parameters

| `value:Object` — The value of padding-right or margin-right.
| `values:Object` — The value of padding or margin.
| `reference:Number` (default = `NaN`)`` — A Number that will be used to convert percentages.

Returns

| `Number` — Number.

getSideValue | () | method |

`public static function getSideValue(value:Object, values:Object, side:int, reference:Number):Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Computes padding or margin.

Parameters

| `value:Object` — The value of padding or margin.
| `values:Object` — The value of padding or margin.
| `side:int` — Which side we want to get. 0 = top, 1 = right, 2 = bottom, 3 = left
| `reference:Number` (default = `NaN`)`` — A Number that will be used to convert percentages.

Returns

| `Number` — Number.

getTopValue | () | method |

`public static function getTopValue(value:Object, values:Object, reference:Number):Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Computes paddingTop or marginTop.

Parameters

| `value:Object` — The value of padding-top or margin-top.
| `values:Object` — The value of padding or margin.
| `reference:Number` (default = `NaN`)`` — A Number that will be used to convert percentages.

Returns

| `Number` — Number.

toColor | () | method |

`public static function toColor(value:Object):uint`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Converts a value describing a color to a uint

Parameters

| `value:Object` — The value.

Returns

| `uint` — uint of the color.

toColorWithAlpha | () | method |

`public static function toColorWithAlpha(value:Object):uint`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Converts a value describing a color and alpha in a uint

Parameters

| `value:Object` — The value.

Returns

| `uint` — uint of the color. If value is "transparent" then uint.MAX_VALUE is returned.

toNumber | () | method |

`public static function toNumber(str:String, reference:Number = 0):Number`

Language Version : | ActionScript 3.0

Product Version : | FlexJS 0.0

Runtime Versions : | Flash Player 10.2, AIR 2.6

Converts a String to number.

Parameters

| `str:String` — The String.
| `reference:Number` (default = `0`)`` — A Number that will be used to convert percentages.

Returns

| `Number` — Number.

Mon Sep 5 2016, 07:19 AM -07:00