BiBorder

This class is used to describe a border for a component. The border consists of three properties; width, style and color. Supported styles are:

none - No border is drawn, regardless of the width.
dotted
dashed
solid
double
groove
ridge
inset
outset

This class extends BiObject and therefore all methods and fields available for BiObject are also available for BiBorder .

Constructor

new BiBorder ( [ nWidth [ ,sStyle [ ,sColor ] ] ] )

Parameters

NameTypeOptionalDefaultDescripton
nWidthNumberchecked0 The width (in pixels) of the border on all sides
sStyleStringcheckedsolid The style of the border on all sides
sColorStringcheckedThe color of the border on all sides

Properties

NameTypegetsetDescripton
bottomColorStringcheckedcheckedThe bottom border color
bottomStyleStringcheckedcheckedThe bottom border style
bottomWidthNumbercheckedcheckedThe bottom border width
colorStringcheckedThe color of the border on all sides
leftColorStringcheckedcheckedThe left border color
leftStyleStringcheckedcheckedThe left border style
leftWidthNumbercheckedcheckedThe left border width
rightColorStringcheckedcheckedThe right border color
rightStyleStringcheckedcheckedThe right border style
rightWidthNumbercheckedcheckedThe right border width
styleStringcheckedThe style of the border on all sides
topColorStringcheckedcheckedThe top border color
topStyleStringcheckedcheckedThe top border style
topWidthNumbercheckedcheckedThe top border width
widthNumbercheckedThe width (in pixels) of the border on all sides

Methods

NameDescription
paintBorderMakes the component have a border described by the current border object
removeBorderRemoves this border from a component. This means that the border styles that this border object has applied to a component will be reset/removed.
setBottomSets the bottom width, style and color
setLeftSets the left width, style and color
setRightSets the right width, style and color
setTopSets the top width, style and color

Events

None.

Static Methods

NameDescription
fromStringParses a string and returns a new border object. The format for the string is

(<size>"px"?)? <style>? <color>?

2px dotted red

The order of the parts is not relevant.

Static Fields

None.

Remarks

To change the border on the component you have to use setBorder(). Changing the border object without calling setBorder() will not update the component.

Method Details

paintBorder

Makes the component have a border described by the current border object

Syntax

object.paintBorder ( oComponent )

Parameters

NameTypeOptionalDefaultDescripton
oComponentBiComponentThe component to draw the border to

Return Type

void

removeBorder

Removes this border from a component. This means that the border styles that this border object has applied to a component will be reset/removed.

Syntax

object.removeBorder ( oComponent )

Parameters

NameTypeOptionalDefaultDescripton
oComponentBiComponentThe component to remove the border from

Return Type

void

setBottom

Sets the bottom width, style and color

Syntax

object.setBottom ( [ nWidth [ ,sStyle [ ,sColor ] ] ] )

Parameters

NameTypeOptionalDefaultDescripton
nWidthNumberchecked0 The width (in pixels) of the bottom border
sStyleStringcheckedsolid The style of the bottom border
sColorStringcheckedThe color of the bottom border

Return Type

void

setLeft

Sets the left width, style and color

Syntax

object.setLeft ( [ nWidth [ ,sStyle [ ,sColor ] ] ] )

Parameters

NameTypeOptionalDefaultDescripton
nWidthNumberchecked0 The width (in pixels) of the left border
sStyleStringcheckedsolid The style of the left border
sColorStringcheckedThe color of the left border

Return Type

void

setRight

Sets the right width, style and color

Syntax

object.setRight ( [ nWidth [ ,sStyle [ ,sColor ] ] ] )

Parameters

NameTypeOptionalDefaultDescripton
nWidthNumberchecked0 The width (in pixels) of the right border
sStyleStringcheckedsolid The style of the right border
sColorStringcheckedThe color of the right border

Return Type

void

setTop

Sets the top width, style and color

Syntax

object.setTop ( [ nWidth [ ,sStyle [ ,sColor ] ] ] )

Parameters

NameTypeOptionalDefaultDescripton
nWidthNumberchecked0 The width (in pixels) of the top border
sStyleStringcheckedsolid The style of the top border
sColorStringcheckedThe color of the top border

Return Type

void

Static Method Details

fromString

Parses a string and returns a new border object. The format for the string is

(<size>"px"?)? <style>? <color>?

2px dotted red

The order of the parts is not relevant.

Syntax

BiBorder . fromString ( s )

Parameters

NameTypeOptionalDefaultDescripton
sStringThe string to parse

Return Type

BiFont