com.vaadin.ui.components.grid.
Interface MultiSelectionModel<T>
-
Type Parameters:
T
- the type of items in gridAll Superinterfaces:
ClientConnector
,Connector
,Extension
,GridSelectionModel<T>
,SelectionModel<T>
,SelectionModel.Multi<T>
,Serializable
All Known Implementing Classes:
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 class
MultiSelectionModel.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.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 Modifier and Type Method Description Registration
addMultiSelectionListener(MultiSelectionListener<T> listener)
Adds a selection listener that will be called when the selection is changed either by the user or programmatically.
default Registration
addSelectionListener(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 in
Binder
.MultiSelectionModel.SelectAllCheckBoxVisibility
getSelectAllCheckBoxVisibility()
Gets the current mode for the select all checkbox visibility.
boolean
isAllSelected()
Returns whether all items are selected or not.
boolean
isSelectAllCheckBoxVisible()
Returns whether the select all checkbox will be visible with the current setting of
setSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility)
.void
setSelectAllCheckBoxVisibility(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 in
Binder
.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:
addSelectionListener
in interfaceSelectionModel<T>
Parameters:
listener
- the listener to addReturns:
a registration handle for removing the listener
See Also:
-
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 useSee Also:
-
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 of
setSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility)
.Returns:
true
if the checkbox will be visible with the current settingsSee Also:
MultiSelectionModel.SelectAllCheckBoxVisibility
,setSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility)
-
isAllSelected
boolean isAllSelected()
Returns whether all items are selected or not.
This is only
true
if user has selected all rows with the select all checkbox on client side, or ifSelectionModel.Multi.selectAll()
has been used from server side.Returns:
true
if all selected,false
if notSince:
8.12.0
-
-