AI-generated Key Takeaways
-
BorderStyle
objects define the style of borders applied to widgets, including corner radius, color, and type. -
You can customize border styles using methods like
setCornerRadius()
,setStrokeColor()
, andsetType()
, which allow you to specify the desired attributes. -
Each customization method returns the
BorderStyle
object, enabling chained method calls for efficient styling. -
Border attributes such as corner radius and stroke color are specified using integers and RGB color strings respectively, providing flexibility in design.
-
Border types are selected from the
BorderType
enum, which offers predefined border styles for easy implementation.
A class that represents a complete border style that can be applied to widgets.
To call an enum, you call its parent class, name, and property. For example,
CardService.BorderStyle.NO_BORDER
.
Methods
Method | Return type | Brief description |
---|---|---|
set | Border | Sets the corner radius of the border, for example 8. |
set | Border | Sets the color of the border. |
set | Border | Sets the type of the border. |
Detailed documentation
setCornerRadius(radius)
Sets the corner radius of the border, for example 8.
Parameters
Name | Type | Description |
---|---|---|
radius | Integer | The corner radius to be applied to the border. |
Return
Border
— This object, for chaining.
setStrokeColor(color)
Sets the color of the border.
Parameters
Name | Type | Description |
---|---|---|
color | String | The color in #RGB format to be applied to the border. |
Return
Border
— This object, for chaining.
setType(type)
Sets the type of the border.
Parameters
Name | Type | Description |
---|---|---|
type | Border | The border type. |
Return
Border
— This object, for chaining.