Class ToggleSelectionModel

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, javax.swing.ListSelectionModel

    public class ToggleSelectionModel
    extends javax.swing.DefaultListSelectionModel
    A list selection model that toggles selection states instead of setting or clearing them.
    Author:
    Chris Jennings
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.DefaultListSelectionModel

        leadAnchorNotificationEnabled, listenerList
      • Fields inherited from interface javax.swing.ListSelectionModel

        MULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void setSelectionInterval​(int index0, int index1)  
      void setValueIsAdjusting​(boolean isAdjusting)  
      • Methods inherited from class javax.swing.DefaultListSelectionModel

        addListSelectionListener, addSelectionInterval, clearSelection, clone, fireValueChanged, fireValueChanged, fireValueChanged, getAnchorSelectionIndex, getLeadSelectionIndex, getListeners, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getSelectionMode, getValueIsAdjusting, insertIndexInterval, isLeadAnchorNotificationEnabled, isSelectedIndex, isSelectionEmpty, moveLeadSelectionIndex, removeIndexInterval, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadAnchorNotificationEnabled, setLeadSelectionIndex, setSelectionMode, toString
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface javax.swing.ListSelectionModel

        getSelectedIndices, getSelectedItemsCount
    • Constructor Detail

      • ToggleSelectionModel

        public ToggleSelectionModel()
    • Method Detail

      • setValueIsAdjusting

        public void setValueIsAdjusting​(boolean isAdjusting)
        Specified by:
        setValueIsAdjusting in interface javax.swing.ListSelectionModel
        Overrides:
        setValueIsAdjusting in class javax.swing.DefaultListSelectionModel
      • setSelectionInterval

        public void setSelectionInterval​(int index0,
                                         int index1)
        Specified by:
        setSelectionInterval in interface javax.swing.ListSelectionModel
        Overrides:
        setSelectionInterval in class javax.swing.DefaultListSelectionModel