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 ( [ width [ ,style [ ,color ] ] ] )

Parameters

Name Type Optional Default Descripton
width Number checked 0 The width (in pixels) of the border on all sides
style String checked solid The style of the border on all sides
color String checked The color of the border on all sides

Properties

Name Type get set Descripton
bottomColor String checked checked The bottom border color
bottomStyle String checked checked The bottom border style
bottomWidth Number checked checked The bottom border width
color Number checked The color of the border on all sides
leftColor String checked checked The left border color
leftStyle String checked checked The left border style
leftWidth Number checked checked The left border width
rightColor String checked checked The right border color
rightStyle String checked checked The right border style
rightWidth Number checked checked The right border width
style Number checked The style of the border on all sides
topColor String checked checked The top border color
topStyle String checked checked The top border style
topWidth Number checked checked The top border width
width Number checked The width (in pixels) of the border on all sides

Methods

Name Description
paintBorder Makes the component have a border described by the current border object
removeBorder Removes this border from a component. This means that the border styles this border object has applied to a component will be reset/removed.
setBottom Sets the bottom width, style and color
setLeft Sets the left width, style and color
setRight Sets the right width, style and color
setTop Sets the top width, style and color

Events

None.

Static Methods

Name Description
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.

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

Name Type Optional Default Descripton
oComponent BiComponent The component to draw the border to

Return Type

void

removeBorder

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

Syntax

object.removeBorder
 (
 oComponent
 )
 

Parameters

Name Type Optional Default Descripton
oComponent BiComponent The component to remove the border from

Return Type

void

setBottom

Sets the bottom width, style and color

Syntax

object.setBottom
 (
 
 [
 width
 [
 ,style
 [
 ,color
 ]
 
 ]
 
 ]
 
 )
 

Parameters

Name Type Optional Default Descripton
width Number checked 0 The width (in pixels) of the bottom border
style String checked solid The style of the bottom border
color String checked The color of the bottom border

Return Type

void

setLeft

Sets the left width, style and color

Syntax

object.setLeft
 (
 
 [
 width
 [
 ,style
 [
 ,color
 ]
 
 ]
 
 ]
 
 )
 

Parameters

Name Type Optional Default Descripton
width Number checked 0 The width (in pixels) of the left border
style String checked solid The style of the left border
color String checked The color of the left border

Return Type

void

setRight

Sets the right width, style and color

Syntax

object.setRight
 (
 
 [
 width
 [
 ,style
 [
 ,color
 ]
 
 ]
 
 ]
 
 )
 

Parameters

Name Type Optional Default Descripton
width Number checked 0 The width (in pixels) of the right border
style String checked solid The style of the right border
color String checked The color of the right border

Return Type

void

setTop

Sets the top width, style and color

Syntax

object.setTop
 (
 
 [
 width
 [
 ,style
 [
 ,color
 ]
 
 ]
 
 ]
 
 )
 

Parameters

Name Type Optional Default Descripton
width Number checked 0 The width (in pixels) of the top border
style String checked solid The style of the top border
color String checked The 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

Name Type Optional Default Descripton
s String The string to parse

Return Type

BiFont