Package com.vaadin.ui.components.grid
Interface MultiSelectionModel<T>
-
- Type Parameters:
T- the type of items in grid
- All Superinterfaces:
ClientConnector,Connector,Extension,GridSelectionModel<T>,SelectionModel<T>,SelectionModel.Multi<T>,Serializable
- All Known Implementing Classes:
MultiSelectionModelImpl,Tree.TreeMultiSelectionModel
public interface MultiSelectionModel<T> extends GridSelectionModel<T>, SelectionModel.Multi<T>
Multiselection model interface for Grid.- Since:
- 8.0
- Author:
- Vaadin Ltd
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classMultiSelectionModel.SelectAllCheckBoxVisibilityState 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.server.ClientConnector
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListener
-
Nested classes/interfaces inherited from interface com.vaadin.data.SelectionModel
SelectionModel.Multi<T>, SelectionModel.Single<T>
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description RegistrationaddMultiSelectionListener(MultiSelectionListener<T> listener)Adds a selection listener that will be called when the selection is changed either by the user or programmatically.default RegistrationaddSelectionListener(SelectionListener<T> listener)Adds a generic listener to this selection model, accepting both single and multiselection events.MultiSelect<T>asMultiSelect()Gets a wrapper to use this multiselection model as a multiselect inBinder.MultiSelectionModel.SelectAllCheckBoxVisibilitygetSelectAllCheckBoxVisibility()Gets the current mode for the select all checkbox visibility.booleanisAllSelected()Returns whether all items are selected or not.booleanisSelectAllCheckBoxVisible()Returns whether the select all checkbox will be visible with the current setting ofsetSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility).voidsetSelectAllCheckBoxVisibility(MultiSelectionModel.SelectAllCheckBoxVisibility selectAllCheckBoxVisibility)Sets the select all checkbox visibility mode.-
Methods inherited from interface com.vaadin.server.ClientConnector
addAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandler
-
Methods inherited from interface com.vaadin.shared.Connector
getConnectorId
-
Methods inherited from interface com.vaadin.ui.components.grid.GridSelectionModel
isUserSelectionAllowed, remove, setUserSelectionAllowed
-
Methods inherited from interface com.vaadin.data.SelectionModel
deselectAll, getSelectedItems, isSelected
-
Methods inherited from interface com.vaadin.data.SelectionModel.Multi
deselect, deselectItems, getFirstSelectedItem, select, selectAll, selectItems, updateSelection
-
-
-
-
Method Detail
-
asMultiSelect
MultiSelect<T> asMultiSelect()
Gets a wrapper to use this multiselection model as a multiselect inBinder.- Returns:
- the multiselect wrapper
-
addSelectionListener
default Registration addSelectionListener(SelectionListener<T> listener)
Adds a generic listener to this selection model, accepting both single and multiselection events.Use
addMultiSelectionListener(MultiSelectionListener)for more specific event on multiselection.- Specified by:
addSelectionListenerin interfaceSelectionModel<T>- Parameters:
listener- the listener to add- Returns:
- a registration handle for removing the listener
- See Also:
addMultiSelectionListener(MultiSelectionListener)
-
addMultiSelectionListener
Registration addMultiSelectionListener(MultiSelectionListener<T> listener)
Adds a selection listener that will be called when the selection is changed either by the user or programmatically.- Parameters:
listener- the value change listener, notnull- Returns:
- a registration for the listener
-
setSelectAllCheckBoxVisibility
void setSelectAllCheckBoxVisibility(MultiSelectionModel.SelectAllCheckBoxVisibility selectAllCheckBoxVisibility)
Sets the select all checkbox visibility mode.The default value is
MultiSelectionModel.SelectAllCheckBoxVisibility.DEFAULT, which means that the checkbox is only visible if the grid's data provider is in- memory.- Parameters:
selectAllCheckBoxVisibility- the visiblity mode to use- See Also:
MultiSelectionModel.SelectAllCheckBoxVisibility
-
getSelectAllCheckBoxVisibility
MultiSelectionModel.SelectAllCheckBoxVisibility getSelectAllCheckBoxVisibility()
Gets the current mode for the select all checkbox visibility.- Returns:
- the select all checkbox visibility mode
- See Also:
MultiSelectionModel.SelectAllCheckBoxVisibility,isSelectAllCheckBoxVisible()
-
isSelectAllCheckBoxVisible
boolean isSelectAllCheckBoxVisible()
Returns whether the select all checkbox will be visible with the current setting ofsetSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility).- Returns:
trueif the checkbox will be visible with the current settings- See Also:
MultiSelectionModel.SelectAllCheckBoxVisibility,setSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility)
-
isAllSelected
boolean isAllSelected()
Returns whether all items are selected or not.This is only
trueif user has selected all rows with the select all checkbox on client side, or ifSelectionModel.Multi.selectAll()has been used from server side.- Returns:
trueif all selected,falseif not- Since:
- 8.12.0
-
-