|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnextapp.echo2.app.list.DefaultListSelectionModel
public class DefaultListSelectionModel
Default ListSelectionModel
implementation.
Field Summary |
---|
Fields inherited from interface nextapp.echo2.app.list.ListSelectionModel |
---|
MULTIPLE_SELECTION, SINGLE_SELECTION |
Constructor Summary | |
---|---|
DefaultListSelectionModel()
|
Method Summary | |
---|---|
void |
addChangeListener(ChangeListener l)
Adds a ChangeListenerb to the selection model, which will
be notified when the selection changes. |
void |
clearSelection()
Deselects all items. |
protected void |
fireValueChanged()
Notifies ChangeListener s that the selection has
changed. |
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 no items are selected. |
void |
removeChangeListener(ChangeListener l)
Removes a ChangeListener from being notified of when the
selection changes. |
void |
setSelectedIndex(int index,
boolean newValue)
Sets the selection state of the given index. |
void |
setSelectionMode(int selectionMode)
Sets the selection mode. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultListSelectionModel()
Method Detail |
---|
public void addChangeListener(ChangeListener l)
ListSelectionModel
ChangeListenerb
to the selection model, which will
be notified when the selection changes.
addChangeListener
in interface ListSelectionModel
l
- the ChangeListener
to addListSelectionModel.addChangeListener(
nextapp.echo2.app.event.ChangeListener)
public void clearSelection()
ListSelectionModel
clearSelection
in interface ListSelectionModel
ListSelectionModel.clearSelection()
protected void fireValueChanged()
ChangeListener
s that the selection has
changed.
public int getMaxSelectedIndex()
ListSelectionModel
getMaxSelectedIndex
in interface ListSelectionModel
ListSelectionModel.getMaxSelectedIndex()
public int getMinSelectedIndex()
ListSelectionModel
getMinSelectedIndex
in interface ListSelectionModel
ListSelectionModel.getMinSelectedIndex()
public int getSelectionMode()
ListSelectionModel
getSelectionMode
in interface ListSelectionModel
ListSelectionModel.SINGLE_SELECTION
: only
one list element may be selected.ListSelectionModel.MULTIPLE_SELECTION
:
multiple list elements may be selected.ListSelectionModel.getSelectionMode()
public boolean isSelectedIndex(int index)
ListSelectionModel
isSelectedIndex
in interface ListSelectionModel
index
- the index
ListSelectionModel.isSelectedIndex(int)
public boolean isSelectionEmpty()
ListSelectionModel
isSelectionEmpty
in interface ListSelectionModel
ListSelectionModel.isSelectionEmpty()
public void removeChangeListener(ChangeListener l)
ListSelectionModel
ChangeListener
from being notified of when the
selection changes.
removeChangeListener
in interface ListSelectionModel
l
- the ChangeListener
to removeListSelectionModel.removeChangeListener(nextapp.echo2.app.event.ChangeListener)
public void setSelectedIndex(int index, boolean newValue)
ListSelectionModel
setSelectedIndex
in interface ListSelectionModel
index
- the indexnewValue
- the new selection stateListSelectionModel.setSelectedIndex(int, boolean)
public void setSelectionMode(int selectionMode)
ListSelectionModel
setSelectionMode
in interface ListSelectionModel
selectionMode
- the selection mode, one of the following values:
ListSelectionModel.SINGLE_SELECTION
: only one list element
may be selected.ListSelectionModel.MULTIPLE_SELECTION
: multiple list elements
may be selected.ListSelectionModel.setSelectionMode(int)
|
NextApp Echo2 v2.1.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |