|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.swing.DefaultListSelectionModel
gov.nasa.gsfc.drl.rtstps.viewer.tables.PickerModel
class PickerModel
This class is a list selection model. I use it in a JList to decide which status elements I will show in a status table. The differences between this model and the default one are (1) the user can select and deselect single items by just clicking on them without needing the control key. It adds or removes the element to the current selection. The default model always clears all other selections and requires that you use the control key to add selections. (2) This model has a "select all" method, which you can wire to a button.
Field Summary | |
---|---|
private int |
listSize
|
private static long |
serialVersionUID
|
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 | |
---|---|
PickerModel(int listSize)
|
Method Summary | |
---|---|
(package private) void |
selectAll()
Select all elements. |
(package private) void |
setListSize(int size)
|
void |
setSelectionInterval(int i0,
int i1)
When a single item is selected, this method changes it to a add/remove toggle. |
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, setValueIsAdjusting, toString |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
private int listSize
private static final long serialVersionUID
Constructor Detail |
---|
PickerModel(int listSize)
Method Detail |
---|
final void setListSize(int size)
final void selectAll()
public void setSelectionInterval(int i0, int i1)
setSelectionInterval
in interface javax.swing.ListSelectionModel
setSelectionInterval
in class javax.swing.DefaultListSelectionModel
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |