Packagegraphics
Classpublic final class Align
InheritanceAlign Inheritance Object

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 = 1
[static] Defines the CENTER value (1).
Align
  CENTER_LEFT : uint
[static] Defines the CENTER_LEFT value (3).
Align
  CENTER_RIGHT : uint
[static] Defines the CENTER_RIGHT value (5).
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
  NONE : uint = 0
[static] Defines the NONE value (0).
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. If the String value isn't valid the Align.CENTER value is return.

Example :

         import graphics.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 graphics.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 = 1

Defines the CENTER value (1).

CENTER_LEFTConstant 
public static const CENTER_LEFT:uint

Defines the CENTER_LEFT value (3).

CENTER_RIGHTConstant 
public static const CENTER_RIGHT:uint

Defines the CENTER_RIGHT value (5).

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).

NONEConstant 
public static const NONE:uint = 0

Defines the NONE value (0).

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).