Package com.vaadin.featurepack.ui
Interface FGrid.SelectionModel.Multi
- All Superinterfaces:
FGrid.SelectionModel,Serializable
- All Known Implementing Classes:
FGrid.MultiSelectionModel
- Enclosing interface:
FGrid.SelectionModel
A SelectionModel that supports multiple selections to be made.
This interface has a contract of having the same behavior, no matter how the selection model is interacted with. In other words, if something is forbidden to do in e.g. the user interface, it must also be forbidden to do in the server-side and client-side APIs.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.featurepack.ui.FGrid.SelectionModel
FGrid.SelectionModel.HasUserSelectionAllowed, FGrid.SelectionModel.Multi, FGrid.SelectionModel.None, FGrid.SelectionModel.Single -
Method Summary
Modifier and TypeMethodDescriptionbooleanMarks items as deselected.booleandeselect(Collection<?> itemIds) Marks items as deselected.booleanMarks all the items in the current Container as deselectedbooleanMarks items as selected.booleanselect(Collection<?> itemIds) Marks items as selected.booleanMarks all the items in the current Container as selectedbooleansetSelected(Object... itemIds) Marks items as selected while deselecting all items not in the varargs array.booleansetSelected(Collection<?> itemIds) Marks items as selected while deselecting all items not in the given Collection.Methods inherited from interface com.vaadin.featurepack.ui.FGrid.SelectionModel
getSelectedRows, isSelected, reset, setGrid
-
Method Details
-
select
Marks items as selected.This method does not clear any previous selection state, only adds to it.
- Parameters:
itemIds- the itemId(s) to mark as selected- Returns:
trueif the selection state changed.falseif all the given itemIds already were selected- Throws:
IllegalArgumentException- if theitemIdsvarargs array isnullor given itemIds don't exist in the container of Grid- See Also:
-
select
Marks items as selected.This method does not clear any previous selection state, only adds to it.
- Parameters:
itemIds- the itemIds to mark as selected- Returns:
trueif the selection state changed.falseif all the given itemIds already were selected- Throws:
IllegalArgumentException- ifitemIdsisnullor given itemIds don't exist in the container of Grid- See Also:
-
deselect
Marks items as deselected.- Parameters:
itemIds- the itemId(s) to remove from being selected- Returns:
trueif the selection state changed.falseif none the given itemIds were selected previously- Throws:
IllegalArgumentException- if theitemIdsvarargs array isnull- See Also:
-
deselect
Marks items as deselected.- Parameters:
itemIds- the itemId(s) to remove from being selected- Returns:
trueif the selection state changed.falseif none the given itemIds were selected previously- Throws:
IllegalArgumentException- ifitemIdsisnull- See Also:
-
selectAll
boolean selectAll()Marks all the items in the current Container as selected- Returns:
trueiff some items were previously not selected- See Also:
-
deselectAll
boolean deselectAll()Marks all the items in the current Container as deselected- Returns:
trueiff some items were previously selected- See Also:
-
setSelected
Marks items as selected while deselecting all items not in the given Collection.- Parameters:
itemIds- the itemIds to mark as selected- Returns:
trueif the selection state changed.falseif all the given itemIds already were selected- Throws:
IllegalArgumentException- ifitemIdsisnullor given itemIds don't exist in the container of Grid
-
setSelected
Marks items as selected while deselecting all items not in the varargs array.- Parameters:
itemIds- the itemIds to mark as selected- Returns:
trueif the selection state changed.falseif all the given itemIds already were selected- Throws:
IllegalArgumentException- if theitemIdsvarargs array isnullor given itemIds don't exist in the container of Grid
-