CheckBox
classin packageklyn.gui.windows
public class CheckBox extends AbstractButton:
└ CheckBox

Check box widget.

box = CheckBox("Enable limiter")
Binding.watch(box::isChecked, lambda(value: Object): print(value))
Attributes inherited from AbstractButton: clicked, pressed, released
Attributes inherited from Widget: keyPressed, keyReleased, mouseMoved, mousePressed, mouseReleased, mouseWheel, paintRequested, resized
Properties
Modifier and Type Member Description
public signal property isChecked
isChecked as Boolean:
Checked state observed by the data-binding engine.
Properties inherited from AbstractButton: icon, isDefaultButton, isPressed, text
Properties inherited from Widget: accentColor, backgroundColor, borderColor, bottom, canFocus, cornerRadius, font, foregroundColor, hasFocus, height, isEnabled, isHovered, isManaged, isTabStop, isVisible, layoutParams, margin, maxHeight, maxWidth, minHeight, minWidth, parent, preferredHeight, preferredWidth, right, sizePolicy, styleClass, width, window, x, y
Constructors
Modifier and Type Member Description
public CheckBox
CheckBox(text as String = ""):
No summary.
Methods
Modifier and Type Member Description
public checkedValue
checkedValue() as Int:
Returns 1 when checked, otherwise 0.
public override click
click() as Void:
Toggles the checked state, notifies Binding.watch, then emits the inherited clicked action event.
public override paint
paint(painter as Painter) as Void:
Paints the check box using the active KSS colors.
Methods inherited from AbstractButton: click, performClick, press, release
Methods inherited from Widget: blur, containsPoint, emitKeyPressed, emitKeyReleased, emitMouseMoved, emitMousePressed, emitMouseReleased, emitMouseWheel, handleTabKey, notifyPaintRequested, paint, paintOverlay, repaint, requestFocus, resolvePreferredHeight, resolvePreferredWidth, resolvedFont, setBounds