Package tripleplay.ui
Class CheckBox
Displays a checkbox which can be toggled. The checkbox must be configured with either a
font-based checkmark, or a checkmark icon, which will be shown when it is checked.
-
Nested Class Summary
Nested classes/interfaces inherited from class tripleplay.ui.Element
Element.Take
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
click()
Programmatically triggers a click of this element.react.SignalView<CheckBox>
clicked()
A signal that is emitted when this element is clicked.void
select
(boolean selected) Updates the selected state of this checkbox.react.Value<Boolean>
selected()
A value that reflects the current selection state and is updated when said state changes.toString()
Methods inherited from class tripleplay.ui.Element
addStyles, addStyles, bindEnabled, bindVisible, bounds, constraint, enabledSlot, hierarchyChanged, isAdded, isEnabled, isShowing, isVisible, location, parent, setConstraint, setEnabled, setStyles, setStyles, setVisible, size, styles, visibleSlot, x, y
-
Constructor Details
-
CheckBox
public CheckBox()Creates a checkbox using the default check glyph: U+2713. -
CheckBox
public CheckBox(char checkChar) Creates a checkbox with the supplied check character. -
CheckBox
-
-
Method Details
-
select
public void select(boolean selected) Updates the selected state of this checkbox. This method is called when the user taps and releases the checkbox. One can override this method if they want to react to only user-interaction-initiated changes to the checkbox's state (versus listening toselected()
which can be updated programmatically). -
selected
Description copied from interface:Togglable
A value that reflects the current selection state and is updated when said state changes. -
clicked
Description copied from interface:Clickable
A signal that is emitted when this element is clicked. -
click
public void click()Description copied from interface:Clickable
Programmatically triggers a click of this element. -
toString
-