T - the grid typepublic abstract class AbstractGridSingleSelectionModel<T> extends Grid.AbstractGridExtension<T> implements GridSingleSelectionModel<T>
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 and Description |
|---|
AbstractGridSingleSelectionModel(Grid<T> grid)
Constructor for passing a reference of the grid to this implementation.
|
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addSelectionListener(com.vaadin.flow.data.selection.SelectionListener<Grid<T>,T> listener) |
com.vaadin.flow.shared.Registration |
addSingleSelectionListener(com.vaadin.flow.data.selection.SingleSelectionListener<Grid<T>,T> listener)
Adds a selection listener that will be called when the selection is
changed either by the user or programmatically.
|
com.vaadin.flow.data.selection.SingleSelect<Grid<T>,T> |
asSingleSelect()
Gets a wrapper to use this single selection model as a single select in
Binder. |
void |
deselect(T item) |
void |
deselectFromClient(T item)
Handles the deselection of an item that originates from the client.
|
protected abstract void |
fireSelectionEvent(com.vaadin.flow.data.selection.SelectionEvent<Grid<T>,T> event)
Method for handling the firing of selection events.
|
void |
generateData(T item,
elemental.json.JsonObject jsonObject) |
Optional<T> |
getSelectedItem() |
boolean |
isDeselectAllowed() |
protected void |
remove()
Remove this extension from its target.
|
void |
select(T item) |
void |
selectFromClient(T item)
Handles the selection of an item that originates from the client.
|
void |
setDeselectAllowed(boolean deselectAllowed) |
extend, getGrid, refreshclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpublic void selectFromClient(T item)
GridSelectionModelselectFromClient in interface GridSelectionModel<T>item - the item being selectedpublic void select(T item)
public void deselectFromClient(T item)
GridSelectionModeldeselectFromClient in interface GridSelectionModel<T>item - the item being deselectedpublic void deselect(T item)
public void setDeselectAllowed(boolean deselectAllowed)
public boolean isDeselectAllowed()
public com.vaadin.flow.data.selection.SingleSelect<Grid<T>,T> asSingleSelect()
GridSingleSelectionModelBinder.asSingleSelect in interface GridSingleSelectionModel<T>public com.vaadin.flow.shared.Registration addSelectionListener(com.vaadin.flow.data.selection.SelectionListener<Grid<T>,T> listener)
public com.vaadin.flow.shared.Registration addSingleSelectionListener(com.vaadin.flow.data.selection.SingleSelectionListener<Grid<T>,T> listener)
GridSingleSelectionModeladdSingleSelectionListener in interface GridSingleSelectionModel<T>listener - the single selection listener, not nullpublic void generateData(T item, elemental.json.JsonObject jsonObject)
generateData in interface com.vaadin.flow.data.provider.DataGenerator<T>protected void remove()
Grid.AbstractGridExtensionremove in class Grid.AbstractGridExtension<T>Copyright © 2024. All rights reserved.