Package com.vaadin.flow.component.grid
Interface GridMultiSelectionModel<T>
-
- Type Parameters:
T
- the type of items in grid
- All Superinterfaces:
GridSelectionModel<T>
,com.vaadin.flow.data.selection.SelectionModel<Grid<T>,T>
,com.vaadin.flow.data.selection.SelectionModel.Multi<Grid<T>,T>
,Serializable
- All Known Implementing Classes:
AbstractGridMultiSelectionModel
public interface GridMultiSelectionModel<T> extends GridSelectionModel<T>, com.vaadin.flow.data.selection.SelectionModel.Multi<Grid<T>,T>
Multiselection model interface for Grid.- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
GridMultiSelectionModel.SelectAllCheckboxVisibility
State for showing the select all checkbox in the grid's default header row for the selection column.-
Nested classes/interfaces inherited from interface com.vaadin.flow.data.selection.SelectionModel
com.vaadin.flow.data.selection.SelectionModel.Multi<C extends com.vaadin.flow.component.Component,T extends Object>, com.vaadin.flow.data.selection.SelectionModel.Single<C extends com.vaadin.flow.component.Component,T extends Object>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description com.vaadin.flow.shared.Registration
addMultiSelectionListener(com.vaadin.flow.data.selection.MultiSelectionListener<Grid<T>,T> listener)
Adds a selection listener that will be called when the selection is changed either by the user or programmatically.com.vaadin.flow.data.selection.MultiSelect<Grid<T>,T>
asMultiSelect()
Gets a wrapper to use this multiselection model as a multiselect inBinder
.GridMultiSelectionModel.SelectAllCheckboxVisibility
getSelectAllCheckboxVisibility()
Gets the current mode for the select all checkbox visibility.boolean
isSelectAllCheckboxVisible()
Returns whether the select all checkbox will be visible with the current setting ofsetSelectAllCheckboxVisibility(SelectAllCheckboxVisibility)
and the type of data set to the Grid (in-memory or lazy).boolean
isSelectionColumnFrozen()
Gets the the selection column's frozen state.void
setSelectAllCheckboxVisibility(GridMultiSelectionModel.SelectAllCheckboxVisibility selectAllCheckBoxVisibility)
Sets the select all checkbox visibility mode.void
setSelectionColumnFrozen(boolean frozen)
Sets the selection column's frozen state.-
Methods inherited from interface com.vaadin.flow.component.grid.GridSelectionModel
deselectFromClient, selectFromClient
-
-
-
-
Method Detail
-
asMultiSelect
com.vaadin.flow.data.selection.MultiSelect<Grid<T>,T> asMultiSelect()
Gets a wrapper to use this multiselection model as a multiselect inBinder
.- Returns:
- the multiselect wrapper
-
addMultiSelectionListener
com.vaadin.flow.shared.Registration addMultiSelectionListener(com.vaadin.flow.data.selection.MultiSelectionListener<Grid<T>,T> listener)
Adds a selection listener that will be called when the selection is changed either by the user or programmatically.- Parameters:
listener
- the multi selection listener, notnull
- Returns:
- a registration for the listener
-
setSelectAllCheckboxVisibility
void setSelectAllCheckboxVisibility(GridMultiSelectionModel.SelectAllCheckboxVisibility selectAllCheckBoxVisibility)
Sets the select all checkbox visibility mode.The default value is
GridMultiSelectionModel.SelectAllCheckboxVisibility.DEFAULT
, which means that the checkbox is only visible if the grid's data provider is in-memory.The select all checkbox will never be shown if the Grid uses lazy loading with unknown item count, i.e. no items count query provided to it, and even setting
GridMultiSelectionModel.SelectAllCheckboxVisibility.VISIBLE
won't make it visible.- Parameters:
selectAllCheckBoxVisibility
- the visiblity mode to use- See Also:
GridMultiSelectionModel.SelectAllCheckboxVisibility
-
getSelectAllCheckboxVisibility
GridMultiSelectionModel.SelectAllCheckboxVisibility getSelectAllCheckboxVisibility()
Gets the current mode for the select all checkbox visibility.- Returns:
- the select all checkbox visibility mode
- See Also:
GridMultiSelectionModel.SelectAllCheckboxVisibility
,isSelectAllCheckboxVisible()
-
isSelectAllCheckboxVisible
boolean isSelectAllCheckboxVisible()
Returns whether the select all checkbox will be visible with the current setting ofsetSelectAllCheckboxVisibility(SelectAllCheckboxVisibility)
and the type of data set to the Grid (in-memory or lazy).The select all checkbox will never be shown if the Grid uses lazy loading with unknown item count, meaning that no count callback has been provided.
- Returns:
true
if the checkbox will be visible with the current settings- See Also:
GridMultiSelectionModel.SelectAllCheckboxVisibility
,setSelectAllCheckboxVisibility(SelectAllCheckboxVisibility)
-
setSelectionColumnFrozen
void setSelectionColumnFrozen(boolean frozen)
Sets the selection column's frozen state.- Parameters:
frozen
- whether to freeze or unfreeze the selection column
-
isSelectionColumnFrozen
boolean isSelectionColumnFrozen()
Gets the the selection column's frozen state.- Returns:
- whether the selection column is frozen
-
-