Class Autocomplete

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.littemplate.LitTemplate
com.vaadin.componentfactory.Autocomplete
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<Autocomplete>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<Autocomplete>, com.vaadin.flow.component.FocusNotifier<Autocomplete>, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix, com.vaadin.flow.internal.Template, Serializable

@Tag("vcf-autocomplete") @NpmPackage(value="@lit-labs/observers",version="2.0.0") @NpmPackage(value="@vaadin-component-factory/vcf-autocomplete",version="3.0.0") @JsModule("@vaadin-component-factory/vcf-autocomplete/src/vcf-autocomplete.js") public class Autocomplete extends com.vaadin.flow.component.littemplate.LitTemplate implements com.vaadin.flow.component.HasTheme, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>, com.vaadin.flow.component.Focusable<Autocomplete>, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix
Server-side component for the vcf-autocomplete element.

Note: isOpened,setOpened and setValue are not supported. The current implementation of the polymer-side component does not allow it.

Author:
Vaadin Ltd
See Also:
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     
    static class 
     
    static class 
     

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier

    com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier

    com.vaadin.flow.component.FocusNotifier.FocusEvent<C extends com.vaadin.flow.component.Component>

    Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue

    com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    Autocomplete(int limit)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.vaadin.flow.shared.Registration
    addAutocompleteValueAppliedListener(com.vaadin.flow.component.ComponentEventListener<Autocomplete.AutocompleteValueAppliedEvent> listener)
     
    com.vaadin.flow.shared.Registration
    addChangeListener(com.vaadin.flow.component.ComponentEventListener<Autocomplete.AucompleteChangeEvent> listener)
     
    com.vaadin.flow.shared.Registration
    addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener<? super Autocomplete.AutocompleteValueAppliedEvent> listener)
     
    com.vaadin.flow.shared.Registration
    addValueClearListener(com.vaadin.flow.component.ComponentEventListener<Autocomplete.ValueClearEvent> listener)
     
     
     
     
    com.vaadin.flow.component.Component
     
    com.vaadin.flow.component.Component
     
     
    boolean
     
    boolean
     
    boolean
     
    boolean
     
    void
    setEnabled(boolean enabled)
     
    void
     
    void
    setInvalid(boolean b)
     
    void
     
    void
    setLimit(int limit)
     
    void
     
    void
    setPlaceholder(String placeholder)
     
    void
    setPrefixComponent(com.vaadin.flow.component.Component component)
     
    void
    setReadOnly(boolean readOnly)
     
    void
    setRequiredIndicatorVisible(boolean requiredIndicatorVisible)
     
    void
    setSuffixComponent(com.vaadin.flow.component.Component component)
     
    void
     

    Methods inherited from class com.vaadin.flow.component.littemplate.LitTemplate

    getChildren

    Methods inherited from class com.vaadin.flow.component.Component

    addListener, findAncestor, fireEvent, from, get, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setVisible

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.vaadin.flow.component.AttachNotifier

    addAttachListener

    Methods inherited from interface com.vaadin.flow.component.BlurNotifier

    addBlurListener

    Methods inherited from interface com.vaadin.flow.component.DetachNotifier

    addDetachListener

    Methods inherited from interface com.vaadin.flow.component.Focusable

    addFocusShortcut, blur, focus, focus, getTabIndex, setTabIndex

    Methods inherited from interface com.vaadin.flow.component.FocusNotifier

    addFocusListener

    Methods inherited from interface com.vaadin.flow.component.HasElement

    getElement

    Methods inherited from interface com.vaadin.flow.component.HasSize

    getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull

    Methods inherited from interface com.vaadin.flow.component.HasStyle

    addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassName

    Methods inherited from interface com.vaadin.flow.component.HasTheme

    addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeName

    Methods inherited from interface com.vaadin.flow.component.HasValidation

    setManualValidation

    Methods inherited from interface com.vaadin.flow.component.HasValue

    clear, getEmptyValue, getOptionalValue, isEmpty
  • Constructor Details

    • Autocomplete

      public Autocomplete()
    • Autocomplete

      public Autocomplete(int limit)
  • Method Details

    • setLimit

      public void setLimit(int limit)
    • setErrorMessage

      public void setErrorMessage(String s)
      Specified by:
      setErrorMessage in interface com.vaadin.flow.component.HasValidation
    • getErrorMessage

      public String getErrorMessage()
      Specified by:
      getErrorMessage in interface com.vaadin.flow.component.HasValidation
    • setInvalid

      public void setInvalid(boolean b)
      Specified by:
      setInvalid in interface com.vaadin.flow.component.HasValidation
    • isInvalid

      public boolean isInvalid()
      Specified by:
      isInvalid in interface com.vaadin.flow.component.HasValidation
    • setEnabled

      public void setEnabled(boolean enabled)
      Specified by:
      setEnabled in interface com.vaadin.flow.component.HasEnabled
    • isEnabled

      public boolean isEnabled()
      Specified by:
      isEnabled in interface com.vaadin.flow.component.HasEnabled
    • getPlaceholderString

      public String getPlaceholderString()
    • setPlaceholder

      public void setPlaceholder(String placeholder)
    • getLabel

      public String getLabel()
    • setLabel

      public void setLabel(String label)
    • setOptions

      public void setOptions(List<String> options)
    • addChangeListener

      public com.vaadin.flow.shared.Registration addChangeListener(com.vaadin.flow.component.ComponentEventListener<Autocomplete.AucompleteChangeEvent> listener)
    • addValueChangeListener

      public com.vaadin.flow.shared.Registration addValueChangeListener(com.vaadin.flow.component.HasValue.ValueChangeListener<? super Autocomplete.AutocompleteValueAppliedEvent> listener)
      Specified by:
      addValueChangeListener in interface com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>
    • addAutocompleteValueAppliedListener

      public com.vaadin.flow.shared.Registration addAutocompleteValueAppliedListener(com.vaadin.flow.component.ComponentEventListener<Autocomplete.AutocompleteValueAppliedEvent> listener)
    • setValue

      public void setValue(String value)
      Specified by:
      setValue in interface com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>
    • getValue

      @Synchronize(property="value", value="value-changed") public String getValue()
      Specified by:
      getValue in interface com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>
    • setReadOnly

      public void setReadOnly(boolean readOnly)
      Specified by:
      setReadOnly in interface com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>
    • isReadOnly

      public boolean isReadOnly()
      Specified by:
      isReadOnly in interface com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>
    • setRequiredIndicatorVisible

      public void setRequiredIndicatorVisible(boolean requiredIndicatorVisible)
      Specified by:
      setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>
    • isRequiredIndicatorVisible

      public boolean isRequiredIndicatorVisible()
      Specified by:
      isRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<Autocomplete.AutocompleteValueAppliedEvent,String>
    • addValueClearListener

      public com.vaadin.flow.shared.Registration addValueClearListener(com.vaadin.flow.component.ComponentEventListener<Autocomplete.ValueClearEvent> listener)
    • setPrefixComponent

      public void setPrefixComponent(com.vaadin.flow.component.Component component)
      Specified by:
      setPrefixComponent in interface com.vaadin.flow.component.shared.HasPrefix
    • getPrefixComponent

      public com.vaadin.flow.component.Component getPrefixComponent()
      Specified by:
      getPrefixComponent in interface com.vaadin.flow.component.shared.HasPrefix
    • setSuffixComponent

      public void setSuffixComponent(com.vaadin.flow.component.Component component)
      Specified by:
      setSuffixComponent in interface com.vaadin.flow.component.shared.HasSuffix
    • getSuffixComponent

      public com.vaadin.flow.component.Component getSuffixComponent()
      Specified by:
      getSuffixComponent in interface com.vaadin.flow.component.shared.HasSuffix