Packagepegas.draw
Classpublic class Align

The Align enumeration class provides constant values to align displays or components.



Public Methods
 MethodDefined by
  
toNumber(str:String):uint
[static] Converts a string value in this Align value.
Align
  
toString(n:Number):String
[static] Returns the string representation of the specified Align value passed in argument.
Align
  
validate(value:uint):Boolean
[static] Returns true if the specified Align value in argument is a valid Align value else returns false.
Align
Public Constants
 ConstantDefined by
  BOTTOM : uint = 16
[static] Defines the BOTTOM value (16).
Align
  BOTTOM_LEFT : uint
[static] Defines the BOTTOM_LEFT value (18).
Align
  BOTTOM_RIGHT : uint
[static] Defines the BOTTOM_RIGHT value (20).
Align
  CENTER : uint = 0
[static] Defines the CENTER value (0).
Align
  LEFT : uint = 2
[static] Defines the LEFT value (2).
Align
  LEFT_BOTTOM : uint
[static] Defines the LEFT_BOTTOM value (50).
Align
  LEFT_TOP : uint
[static] Defines the LEFT_TOP value (42).
Align
  REVERSE : uint = 32
[static] Defines the REVERSE value (32).
Align
  RIGHT : uint = 4
[static] Defines the RIGHT value (4).
Align
  RIGHT_BOTTOM : uint
[static] Defines the RIGHT_BOTTOM value (52).
Align
  RIGHT_TOP : uint
[static] Defines the RIGHT_TOP value (44).
Align
  TOP : uint = 8
[static] Defines the TOP value (8).
Align
  TOP_LEFT : uint
[static] Defines the TOP_LEFT value (10).
Align
  TOP_RIGHT : uint
[static] Defines the TOP_RIGHT value (12).
Align
Method detail
toNumber()method
public static function toNumber(str:String):uint

Converts a string value in this Align value.

Example :

         import pegas.draw.Align ;
         var sAlign:String = "l" ;
         trace( Align.toNumber("l") == Align.LEFT ) ; // true
         
Parameters
str:String

Returns
uint
toString()method 
public static function toString(n:Number):String

Returns the string representation of the specified Align value passed in argument.

Example :

         import pegas.draw.Align ;
         trace( Align.toString(Align.LEFT)) ; // "l"
         trace( Align.toString(Align.TOP_LEFT)) ; // "tl"
         trace( Align.toString(Align.RIGHT_BOTTOM)) ; // "rb"
         
Parameters
n:Number

Returns
String — the string representation of the specified Align value passed in argument.
validate()method 
public static function validate(value:uint):Boolean

Returns true if the specified Align value in argument is a valid Align value else returns false.

Parameters
value:uint

Returns
Booleantrue if the specified Align value in argument is a valid Align value else returns false.
Constant detail
BOTTOMconstant
public static const BOTTOM:uint = 16

Defines the BOTTOM value (16).

BOTTOM_LEFTconstant 
public static const BOTTOM_LEFT:uint

Defines the BOTTOM_LEFT value (18).

BOTTOM_RIGHTconstant 
public static const BOTTOM_RIGHT:uint

Defines the BOTTOM_RIGHT value (20).

CENTERconstant 
public static const CENTER:uint = 0

Defines the CENTER value (0).

LEFTconstant 
public static const LEFT:uint = 2

Defines the LEFT value (2).

LEFT_BOTTOMconstant 
public static const LEFT_BOTTOM:uint

Defines the LEFT_BOTTOM value (50).

LEFT_TOPconstant 
public static const LEFT_TOP:uint

Defines the LEFT_TOP value (42).

REVERSEconstant 
public static const REVERSE:uint = 32

Defines the REVERSE value (32).

RIGHTconstant 
public static const RIGHT:uint = 4

Defines the RIGHT value (4).

RIGHT_BOTTOMconstant 
public static const RIGHT_BOTTOM:uint

Defines the RIGHT_BOTTOM value (52).

RIGHT_TOPconstant 
public static const RIGHT_TOP:uint

Defines the RIGHT_TOP value (44).

TOPconstant 
public static const TOP:uint = 8

Defines the TOP value (8).

TOP_LEFTconstant 
public static const TOP_LEFT:uint

Defines the TOP_LEFT value (10).

TOP_RIGHTconstant 
public static const TOP_RIGHT:uint

Defines the TOP_RIGHT value (12).