|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
T - Grid's row typepublic interface SelectionModel<T>
Common interface for all selection models.
Selection models perform tracking of selected rows in the Grid, as well as dispatching events when the selection state changes.
| Nested Class Summary | |
|---|---|
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. |
| Method Summary | |
|---|---|
java.util.Collection<T> |
getSelectedRows()
Returns a Collection containing all selected rows. |
Renderer<java.lang.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. |
| Method Detail |
|---|
boolean isSelected(T row)
row - row object instance
true, if the row given as argument is considered
selected.Renderer<java.lang.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.
java.util.Collection<T> getSelectedRows()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||