Package com.vaadin.flow.component.grid
Class CustomAbstractGridMultiSelectionModel<T>
java.lang.Object
com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>
com.vaadin.flow.component.grid.CustomAbstractGridMultiSelectionModel<T>
- Type Parameters:
T- the type of the grid items
- All Implemented Interfaces:
com.vaadin.flow.component.grid.GridMultiSelectionModel<T>,com.vaadin.flow.component.grid.GridSelectionModel<T>,com.vaadin.flow.data.provider.DataGenerator<T>,com.vaadin.flow.data.selection.SelectionModel<com.vaadin.flow.component.grid.Grid<T>,,T> com.vaadin.flow.data.selection.SelectionModel.Multi<com.vaadin.flow.component.grid.Grid<T>,,T> Serializable
public abstract class CustomAbstractGridMultiSelectionModel<T>
extends com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>
implements com.vaadin.flow.component.grid.GridMultiSelectionModel<T>
Abstract implementation of a multi selection model for a grid.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.vaadin.flow.component.grid.GridMultiSelectionModel
com.vaadin.flow.component.grid.GridMultiSelectionModel.SelectAllCheckboxVisibilityNested 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>, com.vaadin.flow.data.selection.SelectionModel.Single<C extends com.vaadin.flow.component.Component, T> -
Constructor Summary
ConstructorsConstructorDescriptionCustomAbstractGridMultiSelectionModel(com.vaadin.flow.component.grid.Grid<T> grid) Constructor for passing a reference of the grid to this implementation. -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddMultiSelectionListener(com.vaadin.flow.data.selection.MultiSelectionListener<com.vaadin.flow.component.grid.Grid<T>, T> listener) com.vaadin.flow.shared.RegistrationaddSelectionListener(com.vaadin.flow.data.selection.SelectionListener<com.vaadin.flow.component.grid.Grid<T>, T> listener) voidvoidvoiddeselectFromClient(T item) protected abstract voidfireSelectionEvent(com.vaadin.flow.data.selection.SelectionEvent<com.vaadin.flow.component.grid.Grid<T>, T> event) Method for handling the firing of selection events.voidgenerateData(T item, tools.jackson.databind.node.ObjectNode jsonObject) com.vaadin.flow.component.grid.GridMultiSelectionModel.SelectAllCheckboxVisibilitybooleanbooleanisSelected(T item) booleanprotected voidremove()voidvoidvoidselectFromClient(T item) voidsetSelectAllCheckboxVisibility(com.vaadin.flow.component.grid.GridMultiSelectionModel.SelectAllCheckboxVisibility selectAllCheckBoxVisibility) voidsetSelectionColumnFrozen(boolean frozen) voidupdateSelection(Set<T> addedItems, Set<T> removedItems) Methods inherited from class com.vaadin.flow.component.grid.Grid.AbstractGridExtension
extend, getGrid, refreshMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.data.provider.DataGenerator
destroyAllData, destroyData, refreshDataMethods inherited from interface com.vaadin.flow.component.grid.GridMultiSelectionModel
addClientItemToggleListener, isDragSelect, setDragSelectMethods inherited from interface com.vaadin.flow.data.selection.SelectionModel.Multi
deselectItems, selectItems
-
Constructor Details
-
CustomAbstractGridMultiSelectionModel
Constructor for passing a reference of the grid to this implementation.- Parameters:
grid- reference to the grid for which this selection model is created
-
-
Method Details
-
remove
protected void remove()- Overrides:
removein classcom.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>
-
selectFromClient
- Specified by:
selectFromClientin interfacecom.vaadin.flow.component.grid.GridSelectionModel<T>
-
deselectFromClient
- Specified by:
deselectFromClientin interfacecom.vaadin.flow.component.grid.GridSelectionModel<T>
-
getSelectedItems
-
getFirstSelectedItem
-
select
-
deselect
-
selectAll
public void selectAll() -
deselectAll
public void deselectAll() -
updateSelection
-
isSelected
-
asMultiSelect
public com.vaadin.flow.data.selection.MultiSelect<com.vaadin.flow.component.grid.Grid<T>,T> asMultiSelect()- Specified by:
asMultiSelectin interfacecom.vaadin.flow.component.grid.GridMultiSelectionModel<T>
-
addSelectionListener
-
addMultiSelectionListener
public com.vaadin.flow.shared.Registration addMultiSelectionListener(com.vaadin.flow.data.selection.MultiSelectionListener<com.vaadin.flow.component.grid.Grid<T>, T> listener) - Specified by:
addMultiSelectionListenerin interfacecom.vaadin.flow.component.grid.GridMultiSelectionModel<T>
-
setSelectAllCheckboxVisibility
public void setSelectAllCheckboxVisibility(com.vaadin.flow.component.grid.GridMultiSelectionModel.SelectAllCheckboxVisibility selectAllCheckBoxVisibility) - Specified by:
setSelectAllCheckboxVisibilityin interfacecom.vaadin.flow.component.grid.GridMultiSelectionModel<T>
-
getSelectAllCheckboxVisibility
public com.vaadin.flow.component.grid.GridMultiSelectionModel.SelectAllCheckboxVisibility getSelectAllCheckboxVisibility()- Specified by:
getSelectAllCheckboxVisibilityin interfacecom.vaadin.flow.component.grid.GridMultiSelectionModel<T>
-
isSelectAllCheckboxVisible
public boolean isSelectAllCheckboxVisible()- Specified by:
isSelectAllCheckboxVisiblein interfacecom.vaadin.flow.component.grid.GridMultiSelectionModel<T>
-
generateData
- Specified by:
generateDatain interfacecom.vaadin.flow.data.provider.DataGenerator<T>
-
setSelectionColumnFrozen
public void setSelectionColumnFrozen(boolean frozen) - Specified by:
setSelectionColumnFrozenin interfacecom.vaadin.flow.component.grid.GridMultiSelectionModel<T>
-
isSelectionColumnFrozen
public boolean isSelectionColumnFrozen()- Specified by:
isSelectionColumnFrozenin interfacecom.vaadin.flow.component.grid.GridMultiSelectionModel<T>
-
fireSelectionEvent
protected abstract void fireSelectionEvent(com.vaadin.flow.data.selection.SelectionEvent<com.vaadin.flow.component.grid.Grid<T>, T> event) Method for handling the firing of selection events.- Parameters:
event- the selection event to fire
-