Class CheckBox

All Implemented Interfaces:
LayoutMeasurable, LayoutMeasurableMixin, HasAlignmentProperty, HasBackgroundProperty, HasBlendModeProperty, HasBorderProperty, HasClipProperty, HasEffectProperty, HasFontProperty, HasGraphicProperty, HasHeightProperty, HasImageUrlProperty, HasLayoutXProperty, HasLayoutYProperty, HasManagedProperty, HasMaxHeightProperty, HasMaxWidthProperty, HasMinHeightProperty, HasMinWidthProperty, HasMouseTransparentProperty, HasOnMouseClickedProperty, HasOpacityProperty, HasPaddingProperty, HasParentProperty, HasPrefHeightProperty, HasPrefWidthProperty, HasSelectedProperty, HasSnapToPixelProperty, HasTextAlignmentProperty, HasTextFillProperty, HasTextProperty, HasVisibleProperty, HasWidthProperty, Styleable, EventTarget, Skinnable, INode, PreferenceResizableNode

public class CheckBox extends ButtonBase implements HasSelectedProperty
Author:
Bruno Salmon
  • Property Details

  • Constructor Details

    • CheckBox

      public CheckBox()
    • CheckBox

      public CheckBox(String text)
  • Method Details

    • selectedProperty

      public BooleanProperty selectedProperty()
      Specified by:
      selectedProperty in interface HasSelectedProperty
      Returns:
      the selected property
    • fire

      public void fire()
      Toggles the state of the CheckBox. If allowIndeterminate is true, then each invocation of this function will advance the CheckBox through the states checked, unchecked, and undefined. If allowIndeterminate is false, then the CheckBox will only cycle through the checked and unchecked states, and forcing indeterminate to equal to false.
      Specified by:
      fire in class ButtonBase
    • createDefaultSkin

      protected Skin<?> createDefaultSkin()
      Description copied from class: Control
      Create a new instance of the default skin for this control. This is called to create a skin for the control if no skin is provided via CSS -fx-skin or set explicitly in a sub-class with setSkin(...).
      Overrides:
      createDefaultSkin in class Control
      Returns:
      new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.