Class: Border

graphics. Border


new Border( [side])

Enables and disables the border on the specified sides.

Enables and disables the border on the specified sides. The border is specified as an integer bitwise combination of the constants: graphics.Border.LEFT, graphics.Border.RIGHT, graphics.Border.TOP, graphics.Border.BOTTOM.

Parameters:
Name Type Argument Default Description
side number <optional>
30

The side setting value to define the border configuration. By default is graphics.Border.ALL (30).

Example
var Border = graphics.Border ;

var border = new Border( Border.NO_BORDER ) ;

trace( border ) ;
trace( border.hasBorders() ) ;

border.enableBorderSide( Border.TOP ) ;
trace( border ) ;

border.enableBorderSide( Border.BOTTOM ) ;
trace( border ) ;

border.enableBorderSide( Border.LEFT ) ;
trace( border ) ;

border.enableBorderSide( Border.RIGHT ) ;
trace( border ) ;

Members


<static> ALL

This represents the value to set all the sides of the Rectangle (30).


<static> BOTTOM

This represents the bottom side of the border of the Rectangle (16).


<static> LEFT

This represents the left side of the border of the Rectangle (2).


<static> NO_BORDER

This represents a rectangle without borders (0).


<static> NONE

Defines the NONE value (0).


<static> RIGHT

This represents the right side of the border of the Rectangle (4).


<static> TOP

This represents the top side of the border of the Rectangle (8).


value :number

The side value, an integer bitwise combination.

Type:
  • number

Methods


disableBorderSide(side)

Disables the border on the specified side.

Parameters:
Name Type Description
side number

The side to enable. One of graphics.Border.LEFT, graphics.Border.RIGHT, graphics.Border.TOP, graphics.Border.BOTTOM.


enableBorderSide(side)

Enables the border on the specified side.

Parameters:
Name Type Description
side number

The side to enable. One of graphics.Border.LEFT, graphics.Border.RIGHT, graphics.Border.TOP, graphics.Border.BOTTOM.


hasBorder(type)

Indicates whether the specified type of border is set.

Parameters:
Name Type Description
type number

The side to verify. One of graphics.Border.LEFT, graphics.Border.RIGHT, graphics.Border.TOP, graphics.Border.BOTTOM.

Returns:

true if the specified type of border is set.


hasBorders()

Indicates whether some type of border is set. One of graphics.Border.LEFT, graphics.Border.RIGHT, graphics.Border.TOP, graphics.Border.BOTTOM.

Returns:

true if some type of border is set.


toggleBorder(side [, side])

Toggle a side in this border object.

Parameters:
Name Type Argument Default Description
side number

The side to enable. One of graphics.Border.LEFT, graphics.Border.RIGHT, graphics.Border.TOP, graphics.Border.BOTTOM.

side boolean <optional>
false

Indicates if the side element must be enabled or disabled.

Returns:

true if the function succeeded.


toString()

Returns the String representation of the object.

Returns:

the String representation of the object.


valueOf()

Returns the value of the object.

Returns:

the value of the object.