Namespace: Align

graphics. Align

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

Members


<static, readonly> BOTTOM :number

Defines the BOTTOM value (16).

Type:
  • number
Default Value:
  • 16

<static, readonly> BOTTOM_LEFT :number

Defines the BOTTOM_LEFT value (18).

Type:
  • number
Default Value:
  • graphics.Align.BOTTOM | graphics.Align.LEFT

<static, readonly> BOTTOM_RIGHT :number

Defines the BOTTOM_RIGHT value (20).

Type:
  • number
Default Value:
  • graphics.Align.BOTTOM | graphics.Align.RIGHT

<static> CENTER :number

Defines the CENTER value (1).

Type:
  • number
Default Value:
  • 1

<static, readonly> CENTER_LEFT :number

Defines the CENTER_LEFT value (3).

Type:
  • number
Default Value:
  • 3

<static, readonly> CENTER_RIGHT :number

Defines the CENTER_RIGHT value (5).

Type:
  • number
Default Value:
  • 5

<static, readonly> LEFT :number

Defines the LEFT value (2).

Type:
  • number
Default Value:
  • 2

<static, readonly> LEFT_BOTTOM :number

Defines the LEFT_BOTTOM value (50).

Type:
  • number
Default Value:
  • 50

<static, readonly> LEFT_TOP :number

Defines the LEFT_TOP value (42).

Type:
  • number
Default Value:
  • 42

<static> NONE :number

Defines the NONE value (0).

Type:
  • number
Default Value:
  • 0

<static, readonly> REVERSE :number

Defines the REVERSE value (32).

Type:
  • number
Default Value:
  • 32

<static, readonly> RIGHT :number

Defines the RIGHT value (4).

Type:
  • number
Default Value:
  • 4

<static, readonly> RIGHT_BOTTOM :number

Defines the RIGHT_BOTTOM value (52).

Type:
  • number
Default Value:
  • 52

<static, readonly> RIGHT_TOP :number

Defines the RIGHT_TOP value (44).

Type:
  • number
Default Value:
  • 44

<static, readonly> TOP :number

Defines the TOP value (8).

Type:
  • number
Default Value:
  • 8

<static, readonly> TOP_LEFT :number

Defines the TOP_LEFT value (10).

Type:
  • number
Default Value:
  • 10

<static, readonly> TOP_RIGHT :number

Defines the TOP_RIGHT value (12).

Type:
  • number
Default Value:
  • 12

Methods


<static> toNumber()

Converts a string value in this Align value. If the String value isn't valid the Align.CENTER value is return.

Example
trace( Align.toNumber("l") == Align.LEFT ) ; // true

<static> toString(value)

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

Parameters:
Name Type Description
value number

The valid numeric value to convert in a string expression.

Returns:

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

Example
trace( Align.toString(Align.LEFT)) ; // "l"trace( Align.toString(Align.TOP_LEFT)) ; // "tl"trace( Align.toString(Align.RIGHT_BOTTOM)) ; // "rb"

<static> validate(value)

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

Parameters:
Name Type Description
value number

The numeric value to validate.

Returns:

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

Example
trace( Align.validate(Align.LEFT)) ; // truetrace( Align.toString(1000)) ; // false