T
- the record data typepublic class NoSelectionModel<T> extends SelectionModel.AbstractSelectionModel<T>
SelectionModel.AbstractSelectionModel<T>
Constructor and Description |
---|
NoSelectionModel()
Constructs a NoSelectionModel without a key provider.
|
NoSelectionModel(ProvidesKey<T> keyProvider)
Constructs a NoSelectionModel with the given key provider.
|
Modifier and Type | Method and Description |
---|---|
T |
getLastSelectedObject()
Gets the item that was last selected.
|
boolean |
isSelected(T item)
Check if an object is selected.
|
void |
setSelected(T item,
boolean selected)
Set the selected state of an object and fire a
SelectionChangeEvent if the selection has
changed. |
addSelectionChangeHandler, fireEvent, fireSelectionChangeEvent, getKey, getKeyProvider, isEventCancelled, isEventScheduled, scheduleSelectionChangeEvent, setEventCancelled, setEventScheduled
public NoSelectionModel()
public NoSelectionModel(ProvidesKey<T> keyProvider)
keyProvider
- an instance of ProvidesKeypublic T getLastSelectedObject()
public boolean isSelected(T item)
SelectionModel
item
- the objectpublic void setSelected(T item, boolean selected)
SelectionModel
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.item
- the object to select or deselectselected
- true to select, false to deselectCopyright © 2018. All rights reserved.