T - Grid's row typepublic interface SelectionModel<T>
Selection models perform tracking of selected rows in the Grid, as well as dispatching events when the selection state changes.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
SelectionModel.Multi<T>
Selection model that allows for several rows to be selected at once.
|
static interface |
SelectionModel.None<T>
Interface for a selection model that does not allow anything to be
selected.
|
static interface |
SelectionModel.Single<T>
Selection model that allows a maximum of one row to be selected at any
one time.
|
| Modifier and Type | Method and Description |
|---|---|
Collection<T> |
getSelectedRows()
Returns a Collection containing all selected rows.
|
Renderer<Boolean> |
getSelectionColumnRenderer()
Return the
Renderer responsible for rendering the selection
column. |
boolean |
isSelected(T row)
Return true if the provided row is considered selected under the
implementing selection model.
|
void |
reset()
Resets the SelectionModel to the initial state.
|
void |
setGrid(Grid<T> grid)
Tells this SelectionModel which Grid it belongs to.
|
boolean isSelected(T row)
row - row object instancetrue, if the row given as argument is considered
selected.Renderer<Boolean> getSelectionColumnRenderer()
Renderer responsible for rendering the selection
column.void setGrid(Grid<T> grid)
Implementations are free to have this be a no-op. This method is called internally by Grid.
grid - a Grid instance; null when removing from
Gridvoid reset()
This method can be called internally, for example, when the attached Grid's data source changes.
Collection<T> getSelectedRows()
Copyright © 2016 Vaadin Ltd. All rights reserved.