T
- the data type of records in the listpublic interface SelectionModel<T> extends SelectionChangeEvent.HasSelectionChangedHandlers, ProvidesKey<T>
Modifier and Type | Interface and Description |
---|---|
static class |
SelectionModel.AbstractSelectionModel<T>
A default implementation of
SelectionModel that provides listener
addition and removal. |
Modifier and Type | Method and Description |
---|---|
HandlerRegistration |
addSelectionChangeHandler(SelectionChangeEvent.Handler handler)
Adds a
SelectionChangeEvent handler. |
boolean |
isSelected(T object)
Check if an object is selected.
|
void |
setSelected(T object,
boolean selected)
Set the selected state of an object and fire a
SelectionChangeEvent if the selection has
changed. |
fireEvent
getKey
HandlerRegistration addSelectionChangeHandler(SelectionChangeEvent.Handler handler)
SelectionChangeEvent
handler.addSelectionChangeHandler
in interface SelectionChangeEvent.HasSelectionChangedHandlers
handler
- the handlerboolean isSelected(T object)
object
- the objectvoid setSelected(T object, boolean selected)
SelectionChangeEvent
if the selection has
changed. Subclasses should not fire an event in the case where
selected is true and the object was already selected, or selected
is false and the object was not previously selected.object
- the object to select or deselectselected
- true to select, false to deselect