T - the type of items in gridpublic interface MultiSelectionModel<T> extends GridSelectionModel<T>, SelectionModel.Multi<T>
| Modifier and Type | Interface and Description |
|---|---|
static class |
MultiSelectionModel.SelectAllCheckBoxVisibility
State for showing the select all checkbox in the grid's default header
row for the selection column.
|
ClientConnector.AttachEvent, ClientConnector.AttachListener, ClientConnector.ConnectorErrorEvent, ClientConnector.DetachEvent, ClientConnector.DetachListenerSelectionModel.Multi<T>, SelectionModel.Single<T>| Modifier and Type | Method and 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.
|
isUserSelectionAllowed, remove, setUserSelectionAllowedaddAttachListener, addDetachListener, attach, beforeClientResponse, detach, encodeState, getErrorHandler, getExtensions, getParent, getRpcManager, getStateType, getUI, handleConnectorRequest, isAttached, isConnectorEnabled, markAsDirty, markAsDirtyRecursive, removeAttachListener, removeDetachListener, removeExtension, requestRepaint, requestRepaintAll, retrievePendingRpcCalls, setErrorHandlergetConnectorIddeselect, deselectItems, getFirstSelectedItem, select, selectAll, selectItems, updateSelectiondeselectAll, getSelectedItems, isSelectedMultiSelect<T> asMultiSelect()
Binder.default Registration addSelectionListener(SelectionListener<T> listener)
Use addMultiSelectionListener(MultiSelectionListener) for more
specific event on multiselection.
addSelectionListener in interface SelectionModel<T>listener - the listener to addaddMultiSelectionListener(MultiSelectionListener)Registration addMultiSelectionListener(MultiSelectionListener<T> listener)
listener - the value change listener, not nullvoid setSelectAllCheckBoxVisibility(MultiSelectionModel.SelectAllCheckBoxVisibility selectAllCheckBoxVisibility)
The default value is MultiSelectionModel.SelectAllCheckBoxVisibility.DEFAULT, which
means that the checkbox is only visible if the grid's data provider is
in- memory.
selectAllCheckBoxVisibility - the visiblity mode to useMultiSelectionModel.SelectAllCheckBoxVisibilityMultiSelectionModel.SelectAllCheckBoxVisibility getSelectAllCheckBoxVisibility()
MultiSelectionModel.SelectAllCheckBoxVisibility,
isSelectAllCheckBoxVisible()boolean isSelectAllCheckBoxVisible()
setSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility).true if the checkbox will be visible with the current
settingsMultiSelectionModel.SelectAllCheckBoxVisibility,
setSelectAllCheckBoxVisibility(SelectAllCheckBoxVisibility)boolean isAllSelected()
This is only true if user has selected all rows with the select
all checkbox on client side, or if SelectionModel.Multi.selectAll() has been used
from server side.
true if all selected, false if notCopyright © 2021 Vaadin Ltd. All rights reserved.