Package com.vaadin.flow.component.grid
Class CustomAbstractGridSingleSelectionModel<T>
java.lang.Object
com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>
com.vaadin.flow.component.grid.CustomAbstractGridSingleSelectionModel<T>
- Type Parameters:
T- the grid type
- All Implemented Interfaces:
com.vaadin.flow.component.grid.GridSelectionModel<T>,com.vaadin.flow.component.grid.GridSingleSelectionModel<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.Single<com.vaadin.flow.component.grid.Grid<T>,,T> Serializable
public abstract class CustomAbstractGridSingleSelectionModel<T>
extends com.vaadin.flow.component.grid.Grid.AbstractGridExtension<T>
implements com.vaadin.flow.component.grid.GridSingleSelectionModel<T>
Abstract implementation of a GridSingleSelectionModel.
- Author:
- Vaadin Ltd.
- See Also:
-
Nested Class Summary
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>, com.vaadin.flow.data.selection.SelectionModel.Single<C extends com.vaadin.flow.component.Component, T> -
Constructor Summary
ConstructorsConstructorDescriptionCustomAbstractGridSingleSelectionModel(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.RegistrationaddSelectionListener(com.vaadin.flow.data.selection.SelectionListener<com.vaadin.flow.component.grid.Grid<T>, T> listener) com.vaadin.flow.shared.RegistrationaddSingleSelectionListener(com.vaadin.flow.data.selection.SingleSelectionListener<com.vaadin.flow.component.grid.Grid<T>, T> listener) voidvoiddeselectFromClient(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) booleanprotected voidremove()voidvoidselectFromClient(T item) voidsetDeselectAllowed(boolean deselectAllowed) 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.data.selection.SelectionModel
isSelectedMethods inherited from interface com.vaadin.flow.data.selection.SelectionModel.Single
deselectAll, getFirstSelectedItem, getSelectedItems, setSelectedItem
-
Constructor Details
-
CustomAbstractGridSingleSelectionModel
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
-
selectFromClient
- Specified by:
selectFromClientin interfacecom.vaadin.flow.component.grid.GridSelectionModel<T>
-
select
-
deselectFromClient
- Specified by:
deselectFromClientin interfacecom.vaadin.flow.component.grid.GridSelectionModel<T>
-
deselect
-
getSelectedItem
-
setDeselectAllowed
public void setDeselectAllowed(boolean deselectAllowed) -
isDeselectAllowed
public boolean isDeselectAllowed() -
asSingleSelect
public com.vaadin.flow.data.selection.SingleSelect<com.vaadin.flow.component.grid.Grid<T>,T> asSingleSelect()- Specified by:
asSingleSelectin interfacecom.vaadin.flow.component.grid.GridSingleSelectionModel<T>
-
addSelectionListener
-
addSingleSelectionListener
public com.vaadin.flow.shared.Registration addSingleSelectionListener(com.vaadin.flow.data.selection.SingleSelectionListener<com.vaadin.flow.component.grid.Grid<T>, T> listener) - Specified by:
addSingleSelectionListenerin interfacecom.vaadin.flow.component.grid.GridSingleSelectionModel<T>
-
generateData
- Specified by:
generateDatain interfacecom.vaadin.flow.data.provider.DataGenerator<T>
-
remove
protected void remove()- Overrides:
removein classcom.vaadin.flow.component.grid.Grid.AbstractGridExtension<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
-