Class TriStateCheckBox

All Implemented Interfaces:
ImageObserver, ItemSelectable, MenuContainer, Serializable, Accessible, SwingConstants

public class TriStateCheckBox
extends JCheckBox
A JCheckBox extension that supports a third 'indeterminate' state.
See Also:
Serialized Form
  • Constructor Details

    • TriStateCheckBox

      public TriStateCheckBox()
      Create a Tri state checkbox
    • TriStateCheckBox

      public TriStateCheckBox​(String text)
      Create a Tri State checkbox with the specified text.
      Parameters:
      text - the text for the checkbox
  • Method Details

    • updateUI

      public void updateUI()
      Overrides:
      updateUI in class JCheckBox
    • isIndeterminate

      public boolean isIndeterminate()
      Check if the checkbox is in the 'indeterminate' state.
      Returns:
      true if the state is indeterminate
    • setIndeterminate

      public void setIndeterminate()
      Set the checkbox to 'indeterminate' state.