R
- the type of rows in the table modelpublic interface SelectionModel<R>
Modifier and Type | Method and Description |
---|---|
void |
addSelectedIndex(int index)
Selects the item at
index |
void |
addSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
Adds these indexes to the selection
|
void |
addSelectedIndexListener(EventDataListener<java.lang.Integer> listener) |
void |
addSelectedItem(R item)
Adds the given item to the selection
|
void |
addSelectedItemListener(EventDataListener<R> listener) |
void |
addSelectedItems(java.util.Collection<R> items)
Adds the given items to the selection
|
void |
addSelectedItemsListener(EventDataListener<java.util.List<R>> listener) |
void |
addSelectionChangedListener(EventListener listener) |
void |
clearSelection()
Clears the selection
|
StateObserver |
getMultipleSelectionObserver() |
int |
getSelectedIndex() |
java.util.List<java.lang.Integer> |
getSelectedIndexes() |
R |
getSelectedItem() |
java.util.List<R> |
getSelectedItems() |
int |
getSelectionCount() |
StateObserver |
getSelectionEmptyObserver() |
StateObserver |
getSingleSelectionObserver() |
boolean |
isSelectionEmpty() |
void |
moveSelectionDown()
Moves all selected indexes down one index, wraps around.
|
void |
moveSelectionUp()
Moves all selected indexes up one index, wraps around.
|
void |
removeSelectedIndex(int index)
Removes the item at
index from the selection |
void |
removeSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
Removes the given indexes from the selection
|
void |
removeSelectedIndexListener(EventDataListener listener) |
void |
removeSelectedItem(R item)
Remove the given item from the selection
|
void |
removeSelectedItemListener(EventDataListener listener) |
void |
removeSelectedItems(java.util.Collection<R> items)
Remove the given items from the selection
|
void |
removeSelectedItemsListener(EventDataListener listener) |
void |
removeSelectionChangedListener(EventListener listener) |
void |
selectAll()
Selects all visible entities
|
void |
setSelectedIndex(int index)
Clears the selection and selects the item at
index |
void |
setSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
Selects the given indexes
|
void |
setSelectedItem(R item)
Sets the selected item
|
void |
setSelectedItems(java.util.Collection<R> items)
Selects the given items
|
StateObserver getSelectionEmptyObserver()
StateObserver getMultipleSelectionObserver()
StateObserver getSingleSelectionObserver()
void addSelectionChangedListener(EventListener listener)
listener
- a listener to be notified each time the selection changesvoid removeSelectionChangedListener(EventListener listener)
listener
- the listener to removevoid addSelectedIndexListener(EventDataListener<java.lang.Integer> listener)
listener
- a listener to be notified each time the selected index changesvoid removeSelectedIndexListener(EventDataListener listener)
listener
- the listener to removevoid addSelectedItemListener(EventDataListener<R> listener)
listener
- a listener to be notified each time the selected item changesvoid removeSelectedItemListener(EventDataListener listener)
listener
- the listener to removevoid addSelectedItemsListener(EventDataListener<java.util.List<R>> listener)
listener
- a listener to be notified each time the selected items changevoid removeSelectedItemsListener(EventDataListener listener)
listener
- the listener to removevoid moveSelectionDown()
void moveSelectionUp()
int getSelectedIndex()
void addSelectedIndex(int index)
index
index
- the indexvoid removeSelectedIndex(int index)
index
from the selectionindex
- the indexvoid removeSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
indexes
- the indexesvoid setSelectedIndex(int index)
index
index
- the indexvoid setSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
indexes
- the indexes to selectjava.util.List<java.lang.Integer> getSelectedIndexes()
void selectAll()
void addSelectedIndexes(java.util.Collection<java.lang.Integer> indexes)
indexes
- the indexes to add to the selectionint getSelectionCount()
void setSelectedItems(java.util.Collection<R> items)
items
- the items to selectjava.util.List<R> getSelectedItems()
R getSelectedItem()
void setSelectedItem(R item)
item
- the item to selectvoid addSelectedItem(R item)
item
- the item to add to the selectionvoid addSelectedItems(java.util.Collection<R> items)
items
- the items to add to the selectionvoid removeSelectedItem(R item)
item
- the item to remove from the selectionvoid removeSelectedItems(java.util.Collection<R> items)
items
- the items to remove from the selectionvoid clearSelection()
boolean isSelectionEmpty()