JIDE 3.5.15

com.jidesoft.list
Class CheckBoxListSelectionModelWithWrapper

java.lang.Object
  extended by javax.swing.DefaultListSelectionModel
      extended by com.jidesoft.swing.CheckBoxListSelectionModel
          extended by com.jidesoft.list.CheckBoxListSelectionModelWithWrapper
All Implemented Interfaces:
Serializable, Cloneable, EventListener, ListDataListener, ListSelectionListener, ListSelectionModel

public class CheckBoxListSelectionModelWithWrapper
extends CheckBoxListSelectionModel
implements ListDataListener, ListSelectionListener

CheckBoxListSelectionModelWithWrapper is to work with any CheckBoxList that has at least one list model wrapper in its list model chain. Please be noted that, the index it used to operate is the visual index in the out most list model although it stores selection in the index of actual list model.

Since:
3.3.5
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
 
Constructor Summary
CheckBoxListSelectionModelWithWrapper()
           
CheckBoxListSelectionModelWithWrapper(ListModel model)
           
 
Method Summary
 void addSelectionInterval(int index0, int index1)
           
 void clearSelection()
           
 void contentsChanged(ListDataEvent e)
           
protected  CheckBoxListSelectionModel createOriginalSelectionModel()
          Creates the original selection model.
protected  CheckBoxListSelectionModel createOriginalSelectionModel(ListModel model)
          Creates the original selection model.
 int getAnchorSelectionIndex()
           
 int getLeadSelectionIndex()
           
 int getMaxSelectionIndex()
           
 int getMinSelectionIndex()
           
 CheckBoxListSelectionModel getOriginalSelectionModel()
          Gets the original selection model.
 void insertIndexInterval(int index, int length, boolean before)
          Overrides so that inserting a row will not be selected automatically if the row after it is selected.
 void intervalAdded(ListDataEvent e)
           
 void intervalRemoved(ListDataEvent e)
           
 boolean isSelectedIndex(int index)
           
 void moveLeadSelectionIndex(int leadIndex)
           
 void removeIndexInterval(int index0, int index1)
           
 void removeSelectionInterval(int index0, int index1)
           
 void setAnchorSelectionIndex(int anchorIndex)
           
 void setLeadSelectionIndex(int leadIndex)
           
 void setModel(ListModel model)
           
 void setSelectionInterval(int index0, int index1)
           
 void valueChanged(ListSelectionEvent e)
           
 
Methods inherited from class com.jidesoft.swing.CheckBoxListSelectionModel
getAllEntryIndex, getModel, isAllEntryConsidered, setAllEntryConsidered, setAllEntryIndex
 
Methods inherited from class javax.swing.DefaultListSelectionModel
addListSelectionListener, clone, fireValueChanged, fireValueChanged, fireValueChanged, getListeners, getListSelectionListeners, getSelectionMode, getValueIsAdjusting, isLeadAnchorNotificationEnabled, isSelectionEmpty, removeListSelectionListener, setLeadAnchorNotificationEnabled, setSelectionMode, setValueIsAdjusting, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CheckBoxListSelectionModelWithWrapper

public CheckBoxListSelectionModelWithWrapper()

CheckBoxListSelectionModelWithWrapper

public CheckBoxListSelectionModelWithWrapper(ListModel model)
Method Detail

createOriginalSelectionModel

protected CheckBoxListSelectionModel createOriginalSelectionModel()
Creates the original selection model.

Returns:
the original selection model.
Since:
3.4.2

createOriginalSelectionModel

protected CheckBoxListSelectionModel createOriginalSelectionModel(ListModel model)
Creates the original selection model.

Parameters:
model - the list model
Returns:
the original selection model.
Since:
3.4.2

getOriginalSelectionModel

public CheckBoxListSelectionModel getOriginalSelectionModel()
Gets the original selection model.

Returns:
the original selection model.
Since:
3.4.2

setModel

public void setModel(ListModel model)
Overrides:
setModel in class CheckBoxListSelectionModel

valueChanged

public void valueChanged(ListSelectionEvent e)
Specified by:
valueChanged in interface ListSelectionListener

intervalAdded

public void intervalAdded(ListDataEvent e)
Specified by:
intervalAdded in interface ListDataListener
Overrides:
intervalAdded in class CheckBoxListSelectionModel

intervalRemoved

public void intervalRemoved(ListDataEvent e)
Specified by:
intervalRemoved in interface ListDataListener
Overrides:
intervalRemoved in class CheckBoxListSelectionModel

contentsChanged

public void contentsChanged(ListDataEvent e)
Specified by:
contentsChanged in interface ListDataListener
Overrides:
contentsChanged in class CheckBoxListSelectionModel

insertIndexInterval

public void insertIndexInterval(int index,
                                int length,
                                boolean before)
Description copied from class: CheckBoxListSelectionModel
Overrides so that inserting a row will not be selected automatically if the row after it is selected.

Specified by:
insertIndexInterval in interface ListSelectionModel
Overrides:
insertIndexInterval in class CheckBoxListSelectionModel
Parameters:
index - the index where the rows will be inserted.
length - the number of the rows that will be inserted.
before - it's before or after the index.

isSelectedIndex

public boolean isSelectedIndex(int index)
Specified by:
isSelectedIndex in interface ListSelectionModel
Overrides:
isSelectedIndex in class CheckBoxListSelectionModel

setSelectionInterval

public void setSelectionInterval(int index0,
                                 int index1)
Specified by:
setSelectionInterval in interface ListSelectionModel
Overrides:
setSelectionInterval in class CheckBoxListSelectionModel

addSelectionInterval

public void addSelectionInterval(int index0,
                                 int index1)
Specified by:
addSelectionInterval in interface ListSelectionModel
Overrides:
addSelectionInterval in class CheckBoxListSelectionModel

removeSelectionInterval

public void removeSelectionInterval(int index0,
                                    int index1)
Specified by:
removeSelectionInterval in interface ListSelectionModel
Overrides:
removeSelectionInterval in class CheckBoxListSelectionModel

clearSelection

public void clearSelection()
Specified by:
clearSelection in interface ListSelectionModel
Overrides:
clearSelection in class DefaultListSelectionModel

removeIndexInterval

public void removeIndexInterval(int index0,
                                int index1)
Specified by:
removeIndexInterval in interface ListSelectionModel
Overrides:
removeIndexInterval in class DefaultListSelectionModel

setAnchorSelectionIndex

public void setAnchorSelectionIndex(int anchorIndex)
Specified by:
setAnchorSelectionIndex in interface ListSelectionModel
Overrides:
setAnchorSelectionIndex in class DefaultListSelectionModel

moveLeadSelectionIndex

public void moveLeadSelectionIndex(int leadIndex)
Overrides:
moveLeadSelectionIndex in class DefaultListSelectionModel

setLeadSelectionIndex

public void setLeadSelectionIndex(int leadIndex)
Specified by:
setLeadSelectionIndex in interface ListSelectionModel
Overrides:
setLeadSelectionIndex in class DefaultListSelectionModel

getMinSelectionIndex

public int getMinSelectionIndex()
Specified by:
getMinSelectionIndex in interface ListSelectionModel
Overrides:
getMinSelectionIndex in class CheckBoxListSelectionModel

getMaxSelectionIndex

public int getMaxSelectionIndex()
Specified by:
getMaxSelectionIndex in interface ListSelectionModel
Overrides:
getMaxSelectionIndex in class DefaultListSelectionModel

getAnchorSelectionIndex

public int getAnchorSelectionIndex()
Specified by:
getAnchorSelectionIndex in interface ListSelectionModel
Overrides:
getAnchorSelectionIndex in class DefaultListSelectionModel

getLeadSelectionIndex

public int getLeadSelectionIndex()
Specified by:
getLeadSelectionIndex in interface ListSelectionModel
Overrides:
getLeadSelectionIndex in class DefaultListSelectionModel

JIDE 3.5.15