@Tag(value="paper-chip-input-autocomplete") @NpmPackage(value="@polymer/iron-a11y-keys",version="3.0.1") @NpmPackage(value="@polymer/iron-a11y-keys-behavior",version="3.0.1") @NpmPackage(value="@polymer/iron-icons",version="3.0.1") @NpmPackage(value="@polymer/paper-icon-button",version="3.0.2") @NpmPackage(value="@polymer/paper-input",version="3.0.1") @NpmPackage(value="@polymer/paper-item",version="3.0.1") @NpmPackage(value="@polymer/paper-listbox",version="3.0.1") @NpmPackage(value="@polymer/paper-material",version="3.0.1") @NpmPackage(value="@polymer/paper-ripple",version="3.0.1") @NpmPackage(value="@polymer/paper-styles",version="3.0.1") @JsModule(value="./paper-chip-input-autocomplete.js") public class ChipField<T> extends com.vaadin.flow.component.AbstractField<ChipField<T>,List<T>> implements com.vaadin.flow.component.HasStyle, com.vaadin.flow.data.binder.HasItemsAndComponents<T>, com.vaadin.flow.data.binder.HasDataProvider<T>, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasTheme
| Modifier and Type | Class and Description |
|---|---|
static class |
ChipField.ChipClickedEvent<T> |
static class |
ChipField.ChipCreatedEvent<T> |
static class |
ChipField.ChipEvent<T> |
static class |
ChipField.ChipRemovedEvent<T> |
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>| Modifier and Type | Field and Description |
|---|---|
static String |
CHIP_LABEL |
| Constructor and Description |
|---|
ChipField(String label,
com.vaadin.flow.component.ItemLabelGenerator<T> itemLabelGenerator,
T... availableItems) |
ChipField(String label,
T... availableItems) |
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addChipClickedListener(com.vaadin.flow.component.ComponentEventListener<ChipField.ChipClickedEvent<T>> listener) |
com.vaadin.flow.shared.Registration |
addChipCreatedListener(com.vaadin.flow.component.ComponentEventListener<ChipField.ChipCreatedEvent<T>> listener) |
com.vaadin.flow.shared.Registration |
addChipRemovedListener(com.vaadin.flow.component.ComponentEventListener<ChipField.ChipRemovedEvent<T>> listener) |
void |
addSelectedItem(T newItem) |
String |
getAllowedPattern() |
String[] |
getChipsAsStrings() |
String |
getLabel() |
String |
getValidationErrorMessage() |
String |
getValidationPattern() |
List<T> |
getValue() |
boolean |
isAllowAdditionalItems() |
boolean |
isClosable() |
boolean |
isDisabled()
Deprecated.
use
HasEnabled.isEnabled() |
boolean |
isReadonly()
Deprecated.
use
HasValueAndElement.isReadOnly() |
boolean |
isRequired()
Deprecated.
use
HasValueAndElement.isRequiredIndicatorVisible() |
protected void |
onAttach(com.vaadin.flow.component.AttachEvent attachEvent) |
void |
removeSelectedItem(T itemToRemove) |
void |
setAllowAdditionalItems(boolean allowAdditionalItems) |
void |
setAllowedPattern(String pattern) |
void |
setAvailableItems(List<T> items) |
void |
setChipLabelGenerator(com.vaadin.flow.component.ItemLabelGenerator<T> itemLabelGenerator) |
void |
setClosable(boolean closable) |
void |
setDataProvider(com.vaadin.flow.data.provider.DataProvider<T,?> dataProvider) |
void |
setDisabled(boolean disabled)
Deprecated.
use
HasEnabled.setEnabled(boolean) |
void |
setLabel(String label) |
void |
setNewItemHandler(com.vaadin.flow.function.SerializableFunction<String,T> handler) |
protected void |
setPresentationValue(List<T> newPresentationValue) |
void |
setReadonly(boolean readonly)
Deprecated.
use
#setReadOnly() |
void |
setReadOnly(boolean readOnly) |
void |
setRequired(boolean required)
Deprecated.
use
HasValueAndElement.setRequiredIndicatorVisible(boolean) |
void |
setValidationErrorMessage(String errorMessage) |
void |
setValidationPattern(String pattern) |
void |
validate() |
addValueChangeListener, getEmptyValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameaddComponents, getItemPosition, prependComponentsadd, add, addComponentAsFirst, addComponentAtIndex, remove, removeAllgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFulladdThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNamepublic static final String CHIP_LABEL
@SafeVarargs public ChipField(String label, com.vaadin.flow.component.ItemLabelGenerator<T> itemLabelGenerator, T... availableItems)
@SafeVarargs public ChipField(String label, T... availableItems)
protected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
onAttach in class com.vaadin.flow.component.Componentpublic String getLabel()
public void setLabel(String label)
public String[] getChipsAsStrings()
public void setClosable(boolean closable)
public boolean isClosable()
@Deprecated public void setDisabled(boolean disabled)
HasEnabled.setEnabled(boolean)@Deprecated public boolean isDisabled()
HasEnabled.isEnabled()@Deprecated public void setReadonly(boolean readonly)
#setReadOnly()@Deprecated public boolean isReadonly()
HasValueAndElement.isReadOnly()public void setReadOnly(boolean readOnly)
setReadOnly in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ChipField<T>,List<T>>,List<T>>setReadOnly in interface com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<ChipField<T>,List<T>>,List<T>>@Deprecated public void setRequired(boolean required)
HasValueAndElement.setRequiredIndicatorVisible(boolean)@Deprecated public boolean isRequired()
HasValueAndElement.isRequiredIndicatorVisible()public void setValidationPattern(String pattern)
public String getValidationPattern()
public void setValidationErrorMessage(String errorMessage)
public String getValidationErrorMessage()
public void setAllowedPattern(String pattern)
public String getAllowedPattern()
public void setAllowAdditionalItems(boolean allowAdditionalItems)
public boolean isAllowAdditionalItems()
public void validate()
public com.vaadin.flow.shared.Registration addChipRemovedListener(com.vaadin.flow.component.ComponentEventListener<ChipField.ChipRemovedEvent<T>> listener)
public com.vaadin.flow.shared.Registration addChipCreatedListener(com.vaadin.flow.component.ComponentEventListener<ChipField.ChipCreatedEvent<T>> listener)
public void setChipLabelGenerator(com.vaadin.flow.component.ItemLabelGenerator<T> itemLabelGenerator)
public void setNewItemHandler(com.vaadin.flow.function.SerializableFunction<String,T> handler)
public void setDataProvider(com.vaadin.flow.data.provider.DataProvider<T,?> dataProvider)
setDataProvider in interface com.vaadin.flow.data.binder.HasDataProvider<T>public void addSelectedItem(T newItem)
public void removeSelectedItem(T itemToRemove)
public com.vaadin.flow.shared.Registration addChipClickedListener(com.vaadin.flow.component.ComponentEventListener<ChipField.ChipClickedEvent<T>> listener)
Copyright © 2018–2024 Flowing Code. All rights reserved.