Package tripleplay.ui

Class CheckBox

All Implemented Interfaces:
Clickable<CheckBox>, Togglable<CheckBox>

public class CheckBox extends TextWidget<CheckBox> implements Togglable<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.
  • 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

      public CheckBox(Icon checkIcon)
  • 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 to selected() which can be updated programmatically).
    • selected

      public react.Value<Boolean> selected()
      Description copied from interface: Togglable
      A value that reflects the current selection state and is updated when said state changes.
      Specified by:
      selected in interface Togglable<CheckBox>
    • clicked

      public react.SignalView<CheckBox> clicked()
      Description copied from interface: Clickable
      A signal that is emitted when this element is clicked.
      Specified by:
      clicked in interface Clickable<CheckBox>
    • click

      public void click()
      Description copied from interface: Clickable
      Programmatically triggers a click of this element.
      Specified by:
      click in interface Clickable<CheckBox>
    • toString

      public String toString()
      Overrides:
      toString in class Object