V - Value to store in the Grid.public class GridMultiSelect<V> extends AbstractGridSelect<V,Set<V>> implements WithIdMixin<GridMultiSelect<V>>, WithItemsMixin<V,GridMultiSelect<V>>, WithMaximumSelectionSizeMixin<GridMultiSelect<V>>, WithHelperMixin<GridMultiSelect<V>>, WithHelperPositionableMixin<GridMultiSelect<V>>, WithLabelPositionableMixin<GridMultiSelect<V>>, WithLabelMixin<GridMultiSelect<V>>, WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<Set<V>>,Set<V>>,Set<V>,GridMultiSelect<V>>
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>UNLIMITEDHELPER_ABOVE_THEME_VARIANTLABEL_POSITION_ATTRIBUTE, LABEL_POSITION_DETAILS_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
|
GridMultiSelect(Class<V> type,
boolean createColumns,
V... items)
Constructs the component.
|
protected |
GridMultiSelect(com.vaadin.flow.component.grid.Grid<V> underlyingGrid)
More advanced constructor that allows using predefined grid.
|
|
GridMultiSelect(V... items)
Creates the component.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
configureGrid(com.vaadin.flow.component.grid.Grid<V> grid)
Configures the grid.
|
protected Set<V> |
generateModelValue() |
int |
getMaximumSelectionSize()
Returns the current maximum selection size.
|
protected void |
onGridSelected(com.vaadin.flow.data.selection.SelectionEvent<com.vaadin.flow.component.grid.Grid<V>,V> event)
This method is called when a grid cell is selected in the client.
|
void |
setItems(Collection<V> collection) |
void |
setMaximumSelectionSize(int maximumSelectionSize)
Defines the new maximum selection size.
|
protected void |
setPresentationValue(Set<V> vs) |
protected void |
updateValue() |
getGrid, isEnabled, setEnabled, setReadOnlyadd, getErrorMessage, getLabel, isInvalid, remove, setErrorMessage, setInvalid, setLabeladdValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithIdwithItems, withItems, withItemswithMaximumSelectionSizewithHelperComponent, withHelperTextgetHelperComponent, getHelperText, setHelperComponent, setHelperTextwithHelperAbove, withHelperAbove, withHelperBelowisHelperAbove, setHelperAbove, setHelperAbove, setHelperBelowwithLabelPositiongetLabelPosition, setLabelPositionwithLabelwithValueaddValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible, setValuegetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFulladdFocusShortcut, blur, focus, getTabIndex, setTabIndex@SafeVarargs public GridMultiSelect(V... items)
items - Items to add to the grid.AbstractGridSelect.getGrid()@SafeVarargs public GridMultiSelect(Class<V> type, boolean createColumns, V... items)
type - Type of items displayed in the grid.createColumns - Whether or not to create default columns.items - Items to add to the grid.protected GridMultiSelect(com.vaadin.flow.component.grid.Grid<V> underlyingGrid)
underlyingGrid - A grid to use.protected void onGridSelected(com.vaadin.flow.data.selection.SelectionEvent<com.vaadin.flow.component.grid.Grid<V>,V> event)
AbstractGridSelectCustomField.updateValue().onGridSelected in class AbstractGridSelect<V,Set<V>>event - Event with selection details.protected void configureGrid(com.vaadin.flow.component.grid.Grid<V> grid)
AbstractGridSelectconfigureGrid in class AbstractGridSelect<V,Set<V>>grid - Grid to configure.protected void updateValue()
public void setItems(Collection<V> collection)
setItems in interface com.vaadin.flow.data.binder.HasItems<V>public void setMaximumSelectionSize(int maximumSelectionSize)
HasMaximumSelectionSizesetMaximumSelectionSize in interface HasMaximumSelectionSizemaximumSelectionSize - Maximum selection size.public int getMaximumSelectionSize()
HasMaximumSelectionSizegetMaximumSelectionSize in interface HasMaximumSelectionSizeHasMaximumSelectionSize.UNLIMITED by default.Copyright © 2023 Miki. All rights reserved.