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 |
![]() |
0 |
The width (in pixels) of the border on all sides |
style |
String |
![]() |
solid |
The style of the border on all sides |
color |
String |
![]() |
The color of the border on all sides |
Properties
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 |
|
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 |
|
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 |
![]() |
0 |
The width (in pixels) of the bottom border |
style |
String |
![]() |
solid |
The style of the bottom border |
color |
String |
![]() |
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 |
![]() |
0 |
The width (in pixels) of the left border |
style |
String |
![]() |
solid |
The style of the left border |
color |
String |
![]() |
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 |
![]() |
0 |
The width (in pixels) of the right border |
style |
String |
![]() |
solid |
The style of the right border |
color |
String |
![]() |
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 |
![]() |
0 |
The width (in pixels) of the top border |
style |
String |
![]() |
solid |
The style of the top border |
color |
String |
![]() |
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 |
