public class NoListSelectionModel extends DefaultListSelectionModel
DefaultListSelectionModel also allows that no item can be selected at all.
Use this selection model if you want to disable a JList, but keep the content
readable. Besides allowing a fourth selection mode (NO_SELECTION), it
completely behaves like the DefaultListSelectionModel.| Modifier and Type | Field and Description |
|---|---|
static int |
NO_SELECTION
A value for the selectionMode property: no list index can be selected at all.
|
leadAnchorNotificationEnabled, listenerListMULTIPLE_INTERVAL_SELECTION, SINGLE_INTERVAL_SELECTION, SINGLE_SELECTION| Constructor and Description |
|---|
NoListSelectionModel() |
| Modifier and Type | Method and Description |
|---|---|
void |
addSelectionInterval(int index0,
int index1) |
int |
getSelectionMode() |
void |
insertIndexInterval(int index,
int length,
boolean before) |
void |
setSelectionInterval(int index0,
int index1) |
void |
setSelectionMode(int selectionMode) |
addListSelectionListener, clearSelection, clone, fireValueChanged, fireValueChanged, fireValueChanged, getAnchorSelectionIndex, getLeadSelectionIndex, getListeners, getListSelectionListeners, getMaxSelectionIndex, getMinSelectionIndex, getValueIsAdjusting, isLeadAnchorNotificationEnabled, isSelectedIndex, isSelectionEmpty, moveLeadSelectionIndex, removeIndexInterval, removeListSelectionListener, removeSelectionInterval, setAnchorSelectionIndex, setLeadAnchorNotificationEnabled, setLeadSelectionIndex, setValueIsAdjusting, toStringpublic static final int NO_SELECTION
public NoListSelectionModel()
public void setSelectionInterval(int index0, int index1)
setSelectionInterval in interface ListSelectionModelsetSelectionInterval in class DefaultListSelectionModelpublic void addSelectionInterval(int index0, int index1)
addSelectionInterval in interface ListSelectionModeladdSelectionInterval in class DefaultListSelectionModelpublic void insertIndexInterval(int index, int length, boolean before)
insertIndexInterval in interface ListSelectionModelinsertIndexInterval in class DefaultListSelectionModelpublic void setSelectionMode(int selectionMode)
setSelectionMode in interface ListSelectionModelsetSelectionMode in class DefaultListSelectionModelpublic int getSelectionMode()
getSelectionMode in interface ListSelectionModelgetSelectionMode in class DefaultListSelectionModelCopyright © 2004–2016. All rights reserved.