Class JCheckBoxListModel<E>

java.lang.Object
javax.swing.AbstractListModel<E>
javax.swing.DefaultListModel<E>
com.illumon.iris.gui.widget.JCheckBoxListModel<E>
Type Parameters:
E - the type of the elements of this model
All Implemented Interfaces:
Serializable, ListModel<E>

public class JCheckBoxListModel<E>
extends DefaultListModel<E>
List model for JCheckBoxLIst
See Also:
Serialized Form
  • Constructor Details

  • Method Details

    • toggleSelection

      public void toggleSelection​(E element)
      Toggles the selection of an element on or off.
      Parameters:
      element - the element to toggle
    • isSelected

      public boolean isSelected​(E element)
      Checks if an element is selected.
      Parameters:
      element - the element to check
      Returns:
      true if it selected, false otherwise
    • getSelectedSet

      public Set<E> getSelectedSet()
      Gets the selected set of elements.
      Returns:
      the selected set of elements
    • selectAll

      public void selectAll()
      Selects all the elements in the list model.
    • deselectAll

      public void deselectAll()
      Deselects all elements in the list model.