|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ListSelectionModel
A representation of the selected items in a ListBox.
Field Summary | |
---|---|
static int |
MULTIPLE_SELECTION
|
static int |
SINGLE_SELECTION
|
Method Summary | |
---|---|
void |
addListSelectionListener(ListSelectionListener l)
Adds a ListSelectionListener to the selection model. |
void |
clearSelection()
Deselects all items. |
int |
getMaxSelectedIndex()
Returns the maximum selected index. |
int |
getMinSelectedIndex()
Returns the minimum selected index. |
int |
getSelectionMode()
Returns the selection mode. |
boolean |
isSelectedIndex(int index)
Determines whether an index is selected. |
boolean |
isSelectionEmpty()
Determines if any items are selected. |
void |
removeListSelectionListener(ListSelectionListener l)
Removes a ListSelectionListener from the selection model. |
void |
setSelectedIndex(int index,
boolean selected)
Sets the selection state of the given index. |
void |
setSelectionMode(int selectionMode)
Sets the selection mode. |
Field Detail |
---|
static final int SINGLE_SELECTION
static final int MULTIPLE_SELECTION
Method Detail |
---|
void addListSelectionListener(ListSelectionListener l)
ListSelectionListener
to the selection model.
l
- The ListSelectionListener
to be added.void clearSelection()
int getMaxSelectedIndex()
int getMinSelectedIndex()
int getSelectionMode()
boolean isSelectedIndex(int index)
index
- The index to test for selection.
boolean isSelectionEmpty()
void removeListSelectionListener(ListSelectionListener l)
ListSelectionListener
from the selection model.
l
- The ListSelectionListener
to be removed.void setSelectedIndex(int index, boolean selected)
index
- The index to select.void setSelectionMode(int selectionMode)
selectionMode
- The selection mode, one of the following values:
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |