|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
The interface for all selection models.
| Field Summary | |
static int |
SELECTION_MODE_MULTIPLE_INTERVAL
Any number of intervals may be selected in this mode |
static int |
SELECTION_MODE_NONE
No selections may be made in this mode |
static int |
SELECTION_MODE_SINGLE
A single selection may be made in this mode |
static int |
SELECTION_MODE_SINGLE_INTERVAL
A single interval ( range ) may be selected in this mode |
| Method Summary | |
int[] |
clearSelections()
Clears all selections in the selection model. |
int |
getMaxSelectionIndex()
Gets the highest index currently selected. |
int |
getMinSelectionIndex()
Gets the lowest index currently selected. |
int |
getSelectedIndex()
Returns an int denoting the index currently selected, or -1 if none are selected. |
int[] |
getSelectedIndices()
Returns an int array containing all currently selected elements. |
int |
getSelectionMode()
Gets the current selection mode, will be one of: SELECTION_MODE_NONE,
SELECTION_MODE_SINGLE,
SELECTION_MODE_SINGLE_INTERVAL. |
boolean |
isSelected(int index)
Returns the selection status of a specified element. |
void |
removeSelection(int index)
Removes a specified selection from the selection model. |
int[] |
setSelectedIndex(int index,
boolean selected,
int listSize)
Sets the specified element to the specified state. |
int[] |
setSelectedIndices(int[] indices,
boolean selected,
int listSize)
Sets the specified elements to the specified state. |
void |
setSelectionMode(int selectionMode)
Sets the selection mode. |
| Field Detail |
public static final int SELECTION_MODE_NONE
public static final int SELECTION_MODE_SINGLE
public static final int SELECTION_MODE_SINGLE_INTERVAL
public static final int SELECTION_MODE_MULTIPLE_INTERVAL
| Method Detail |
public int getSelectionMode()
SELECTION_MODE_NONE,
SELECTION_MODE_SINGLE,
SELECTION_MODE_SINGLE_INTERVAL.
SELECTION_MODE_MULTIPLE_INTERVAL.public void setSelectionMode(int selectionMode)
SELECTION_MODE_NONE,
SELECTION_MODE_SINGLE,
SELECTION_MODE_SINGLE_INTERVAL.
SELECTION_MODE_MULTIPLE_INTERVAL.
NB. Calling this method may alter the contents of the selection model.
For example, if multiple intervals are selected and the mode then set
to single selection, all the intervals other than that at index 0 will
be deleted.selectionMode - the new selection mode.public int getMinSelectionIndex()
public int getMaxSelectionIndex()
public int getSelectedIndex()
public int[] getSelectedIndices()
public int[] setSelectedIndex(int index,
boolean selected,
int listSize)
index - the index of the element to set.selected - the state to set the element to.listSize - size of the AbstractTable.
Allows implementing classes to bounds check the index they have been passed.
public int[] setSelectedIndices(int[] indices,
boolean selected,
int listSize)
indices - an array of the elements to set.selected - the new selection state for all of the specified elements.listSize - the size of the AbstractTable.
Allows implementing classes to bounds check the indices they have been passed.public int[] clearSelections()
public boolean isSelected(int index)
index - the specified element.public void removeSelection(int index)
index - the index of the selection being removed.
|
Copyright 2002 Yospace Holdings Ltd. All Rights Reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||