Overview
JCheckBox is a customizable checkbox component that extends JavaFX’s CheckBox with theme-aware styling options.
Constructors
JCheckBox()
Creates a checkbox with no text label.JCheckBox(String text)
Creates a checkbox with the specified text label.The text label to display next to the checkbox
Properties
colorStyle
The color style of the checkbox
PRIMARY- Primary theme colorSUCCESS- Success/green colorDANGER- Danger/red colorWARNING- Warning/yellow colorINFO- Info/blue colorDARK- Dark colorSECONDARY- Secondary theme color
size
The size of the checkbox
SMALL- Small checkboxDEFAULT- Default/medium checkboxLARGE- Large checkbox
Methods
setColorStyle(CheckBoxStyle style)
Sets the color style of the checkbox.The color style to apply
getColorStyle()
Returns the current color style.The current color style of the checkbox
colorStyleProperty()
Returns the color style property for binding.The observable property for color style
setSize(CheckBoxSize size)
Sets the size of the checkbox.The size to apply
getSize()
Returns the current size.The current size of the checkbox
sizeProperty()
Returns the size property for binding.The observable property for size
Example Usage
CSS Style Classes
The component applies the following style classes:j-checkbox- Base style classcheckbox-primary,checkbox-success, etc. - Color style classescheckbox-sm,checkbox-md,checkbox-lg- Size style classes