T - the grid bean typepublic class GridNoneSelectionModel<T> extends Object implements GridSelectionModel<T>
SelectionModel.Multi<C extends Component,T>, SelectionModel.Single<C extends Component,T>| Constructor and Description |
|---|
GridNoneSelectionModel() |
| Modifier and Type | Method and Description |
|---|---|
Registration |
addSelectionListener(SelectionListener<Grid<T>,T> listener)
Adds a generic listener to this selection model, accepting both single
and multiselection events.
|
void |
deselect(T item)
Deselects the given item.
|
void |
deselectAll()
Deselects all currently selected items, if any.
|
void |
deselectFromClient(T item)
Handles the deselection of an item that originates from the client.
|
Optional<T> |
getFirstSelectedItem()
Get first selected data item.
|
Set<T> |
getSelectedItems()
Returns an immutable set of the currently selected items.
|
void |
select(T item)
Selects the given item.
|
void |
selectFromClient(T item)
Handles the selection of an item that originates from the client.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitisSelectedpublic Set<T> getSelectedItems()
SelectionModelSelectionModel methods while iterating over the set.
Implementation note: the iteration order of the items in the returned set should be well-defined and documented by the implementing class.
getSelectedItems in interface SelectionModel<Grid<T>,T>public Optional<T> getFirstSelectedItem()
SelectionModel
This is the same as SelectionModel.Single.getSelectedItem() in case of single
selection and the first selected item from
SelectionModel.getSelectedItems() in case of multiselection.
getFirstSelectedItem in interface SelectionModel<Grid<T>,T>public void select(T item)
SelectionModelselect in interface SelectionModel<Grid<T>,T>item - the item to select, not nullpublic void deselect(T item)
SelectionModeldeselect in interface SelectionModel<Grid<T>,T>item - the item to deselect, not nullpublic void deselectAll()
SelectionModeldeselectAll in interface SelectionModel<Grid<T>,T>public void selectFromClient(T item)
GridSelectionModelselectFromClient in interface GridSelectionModel<T>item - the item being selectedpublic void deselectFromClient(T item)
GridSelectionModeldeselectFromClient in interface GridSelectionModel<T>item - the item being deselectedpublic Registration addSelectionListener(SelectionListener<Grid<T>,T> listener)
SelectionModeladdSelectionListener in interface SelectionModel<Grid<T>,T>listener - the listener to add, not nullCopyright © 2025. All rights reserved.