K - Key type.V - Value type.@Tag(value="map-entry-field") @JsModule(value="./map-entry-field.js") public class MapEntryField<K,V> extends com.vaadin.flow.component.customfield.CustomField<Map.Entry<K,V>>
Map.Entry. Allows customisation of layout, key component and value component.
It uses DEFAULT_LAYOUT_PROVIDER and LabelField by default.com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>| Modifier and Type | Field and Description |
|---|---|
static com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.component.orderedlayout.FlexLayout> |
DEFAULT_LAYOUT_PROVIDER
Default layout provider used by
MapEntryField. |
| Constructor and Description |
|---|
MapEntryField()
Creates a
MapEntryField that uses a (non-modifiable via the UI) LabelField as key and value component and a DEFAULT_LAYOUT_PROVIDER. |
MapEntryField(com.vaadin.flow.function.SerializableSupplier<KC> keyComponentSupplier,
com.vaadin.flow.function.SerializableSupplier<VC> valueComponentSupplier)
Creates a
MapEntryField with given providers for key and value component, and with DEFAULT_LAYOUT_PROVIDER. |
MapEntryField(com.vaadin.flow.function.SerializableSupplier<L> layoutSupplier)
Creates a
MapEntryField that uses a (non-modifiable via the UI) LabelField as key and value component and a provided layout supplier. |
MapEntryField(com.vaadin.flow.function.SerializableSupplier<L> layoutSupplier,
com.vaadin.flow.function.SerializableSupplier<KC> keyComponentSupplier,
com.vaadin.flow.function.SerializableSupplier<VC> valueComponentSupplier)
Creates a
MapEntryField with given providers for layout, key component and value component. |
| Modifier and Type | Method and Description |
|---|---|
protected Map.Entry<K,V> |
generateModelValue() |
<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,K>> |
getKeyComponentSupplier()
Returns the current supplier of key components.
|
<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents> |
getLayoutSupplier()
Returns the current supplier of layout.
|
<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,V>> |
getValueComponentSupplier()
Returns the current supplier of value components.
|
<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,K>> |
setKeyComponentSupplier(com.vaadin.flow.function.SerializableSupplier<C> keyComponentSupplier)
Sets a new key component supplier.
|
<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents> |
setLayoutSupplier(com.vaadin.flow.function.SerializableSupplier<C> layoutSupplier)
Sets a new supplier of layout.
|
protected void |
setPresentationValue(Map.Entry<K,V> entry) |
void |
setReadOnly(boolean readOnly) |
<C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,V>> |
setValueComponentSupplier(com.vaadin.flow.function.SerializableSupplier<C> valueComponentSupplier)
Sets a new value component supplier.
|
add, getErrorMessage, getLabel, isInvalid, remove, setErrorMessage, setInvalid, setLabel, updateValueaddValueChangeListener, 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, waitgetCssSize, 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, setTabIndexgetHelperComponent, getHelperText, setHelperComponent, setHelperTextpublic static final com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.component.orderedlayout.FlexLayout> DEFAULT_LAYOUT_PROVIDER
MapEntryField.public MapEntryField(com.vaadin.flow.function.SerializableSupplier<L> layoutSupplier,
com.vaadin.flow.function.SerializableSupplier<KC> keyComponentSupplier,
com.vaadin.flow.function.SerializableSupplier<VC> valueComponentSupplier)
MapEntryField with given providers for layout, key component and value component.L - Ensures layout provider is both a Component and HasComponents.KC - Ensures key component provider is both a Component and HasValue of type K.VC - Ensures value component provider is both a Component and HasValue of type V.layoutSupplier - Supplier of a layout to put key and value components in, in that order.keyComponentSupplier - Provides a field to display a key of the entry.valueComponentSupplier - Provides a field to display a value of the entry.public MapEntryField(com.vaadin.flow.function.SerializableSupplier<KC> keyComponentSupplier,
com.vaadin.flow.function.SerializableSupplier<VC> valueComponentSupplier)
MapEntryField with given providers for key and value component, and with DEFAULT_LAYOUT_PROVIDER.KC - Ensures key component provider is both a Component and HasValue of type K.VC - Ensures value component provider is both a Component and HasValue of type V.keyComponentSupplier - Provides a field to display a key of the entry.valueComponentSupplier - Provides a field to display a value of the entry.public MapEntryField(com.vaadin.flow.function.SerializableSupplier<L> layoutSupplier)
MapEntryField that uses a (non-modifiable via the UI) LabelField as key and value component and a provided layout supplier.L - Ensures layout provider is both a Component and HasComponents.layoutSupplier - Supplier of a layout to put key and value components in, in that order.setKeyComponentSupplier(SerializableSupplier),
setValueComponentSupplier(SerializableSupplier)public MapEntryField()
MapEntryField that uses a (non-modifiable via the UI) LabelField as key and value component and a DEFAULT_LAYOUT_PROVIDER.public <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,K>> Supplier<C> getKeyComponentSupplier()
C - Ensures the result provides a Component that HasValue of type K.Supplier.public <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,K>> void setKeyComponentSupplier(com.vaadin.flow.function.SerializableSupplier<C> keyComponentSupplier)
C - Ensures the supplier provides a Component that HasValue of type K.keyComponentSupplier - A supplier to use.public <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,V>> Supplier<C> getValueComponentSupplier()
C - Ensures the result supplies a Component that HasValue of type V.Supplier.public <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasValue<?,V>> void setValueComponentSupplier(com.vaadin.flow.function.SerializableSupplier<C> valueComponentSupplier)
C - Ensures the supplier provides a Component that HasValue of type V.valueComponentSupplier - A supplier to use.public <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents> Supplier<C> getLayoutSupplier()
C - Ensures the result provides a Component that HasComponents.Supplierpublic <C extends com.vaadin.flow.component.Component & com.vaadin.flow.component.HasComponents> void setLayoutSupplier(com.vaadin.flow.function.SerializableSupplier<C> layoutSupplier)
C - Ensures the supplier provides a Component that HasComponents.layoutSupplier - A supplier to use. Key component will be added first, followed by the value component.public void setReadOnly(boolean readOnly)
Copyright © 2024 Miki. All rights reserved.