Class Input

java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<Input,String>
com.vaadin.flow.component.AbstractSinglePropertyField<Input,String>
com.vaadin.flow.component.html.Input
All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<Input>, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<Input>, com.vaadin.flow.component.FocusNotifier<Input>, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasPlaceholder, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<Input,String>,String>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<Input,String>,String>, com.vaadin.flow.data.value.HasValueChangeMode, Serializable

@Tag("input") public class Input extends com.vaadin.flow.component.AbstractSinglePropertyField<Input,String> implements com.vaadin.flow.component.Focusable<Input>, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.data.value.HasValueChangeMode, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasPlaceholder
Component representing an <input> element.
Since:
1.0
Author:
Vaadin Ltd
See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField

    com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>

    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<?>>
  • Field Summary

    Fields inherited from interface com.vaadin.flow.data.value.HasValueChangeMode

    DEFAULT_CHANGE_TIMEOUT
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new input without any specific type, with ON_CHANGE value change mode.
    Input(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
    Creates a new input without any specific type.
  • Method Summary

    Modifier and Type
    Method
    Description
     
    Gets the type of this input.
    com.vaadin.flow.data.value.ValueChangeMode
     
    int
    The default value is HasValueChangeMode.DEFAULT_CHANGE_TIMEOUT.
    void
    setPlaceholder(String placeholder)
     
    void
    Sets the type of this input.
    void
    setValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
     
    void
    setValueChangeTimeout(int valueChangeTimeout)
     

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

    getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEvent

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

    addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEquals

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

    addListener, findAncestor, fireEvent, from, get, getChildren, 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, getTabIndex, setTabIndex

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

    addFocusListener

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

    getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledBy

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

    getElement

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

    isEnabled, setEnabled

    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.HasValue

    clear, getOptionalValue

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

    isReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisible
  • Constructor Details

    • Input

      public Input()
      Creates a new input without any specific type, with ON_CHANGE value change mode.
    • Input

      public Input(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
      Creates a new input without any specific type.
      Parameters:
      valueChangeMode - initial value change mode, or null to disable the value synchronization
  • Method Details

    • setPlaceholder

      public void setPlaceholder(String placeholder)
      Specified by:
      setPlaceholder in interface com.vaadin.flow.component.HasPlaceholder
    • getPlaceholder

      public String getPlaceholder()
      Specified by:
      getPlaceholder in interface com.vaadin.flow.component.HasPlaceholder
    • setType

      public void setType(String type)
      Sets the type of this input.
      Parameters:
      type - the type, not null
      See Also:
    • getType

      public String getType()
      Gets the type of this input.
      Returns:
      the input type, by default "text"
    • getValueChangeMode

      public com.vaadin.flow.data.value.ValueChangeMode getValueChangeMode()
      Specified by:
      getValueChangeMode in interface com.vaadin.flow.data.value.HasValueChangeMode
    • setValueChangeMode

      public void setValueChangeMode(com.vaadin.flow.data.value.ValueChangeMode valueChangeMode)
      Specified by:
      setValueChangeMode in interface com.vaadin.flow.data.value.HasValueChangeMode
    • setValueChangeTimeout

      public void setValueChangeTimeout(int valueChangeTimeout)
      Specified by:
      setValueChangeTimeout in interface com.vaadin.flow.data.value.HasValueChangeMode
    • getValueChangeTimeout

      public int getValueChangeTimeout()
      The default value is HasValueChangeMode.DEFAULT_CHANGE_TIMEOUT.
      Specified by:
      getValueChangeTimeout in interface com.vaadin.flow.data.value.HasValueChangeMode