|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ISelectable is an interface that represents an Object that contains some sort of list of which various items can be selected.
| Method Summary | |
int |
countSelectedIndexes()
Returns the number of items that are currently selected. |
int |
getSelectedIndex(int indexOfSelectedIndex)
This returns one of the selected index. |
int[] |
getSelectedIndexes()
Get a list of all the currently selected items as an array of indexes. |
boolean |
isSelected(int index)
Checks if an item is selected. |
void |
select(int index,
boolean chosen)
Select or deselect a single item. |
void |
setSelectedIndexes(int[] chosen)
Set which indexes should be selected. |
| Method Detail |
public int[] getSelectedIndexes()
public void setSelectedIndexes(int[] chosen)
chosen - an array of integer indexes to be set as the selection.
public void select(int index,
boolean chosen)
index - the index of the item.chosen - true to select the item, false to deselect it.public boolean isSelected(int index)
index - the index of the item.
public int countSelectedIndexes()
public int getSelectedIndex(int indexOfSelectedIndex)
indexOfSelectedIndex - which of the selected indexes to return.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||