Package com.vaadin.featurepack.ui
Interface FGrid.SelectionModel
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
FGrid.SelectionModel.HasUserSelectionAllowed,FGrid.SelectionModel.Multi,FGrid.SelectionModel.None,FGrid.SelectionModel.Single
- All Known Implementing Classes:
FGrid.AbstractSelectionModel,FGrid.MultiSelectionModel,FGrid.NoSelectionModel,FGrid.SingleSelectionModel
- Enclosing class:
FGrid
The server-side interface that controls Grid's selection state.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic interfaceInterface implemented by selection models which support disabling client side selection while still allowing programmatic selection on the server.static interfaceA SelectionModel that supports multiple selections to be made.static interfaceA SelectionModel that does not allow for rows to be selected.static interfaceA SelectionModel that supports for only single rows to be selected at a time. -
Method Summary
Modifier and TypeMethodDescriptionReturns a collection of all the currently selected itemIds.booleanisSelected(Object itemId) Checks whether an item is selected or not.voidreset()Resets the SelectiomModel to an initial state.voidInjects the currentGridinstance into the SelectionModel.
-
Method Details
-
isSelected
Checks whether an item is selected or not.- Parameters:
itemId- the item id to check for- Returns:
trueiff the item is selected
-
getSelectedRows
Collection<Object> getSelectedRows()Returns a collection of all the currently selected itemIds.- Returns:
- a collection of all the currently selected itemIds
-
setGrid
Injects the currentGridinstance into the SelectionModel.Note: This method should not be called manually.
- Parameters:
grid- the Grid in which the SelectionModel currently is, ornullwhen a selection model is being detached from a Grid.
-
reset
void reset()Resets the SelectiomModel to an initial state.Most often this means that the selection state is cleared, but implementations are free to interpret the "initial state" as they wish. Some, for example, may want to keep the first selected item as selected.
-