Package com.vaadin.flow.component.html
Class Input
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<C,T>
com.vaadin.flow.component.AbstractSinglePropertyField<Input,String>
com.vaadin.flow.component.html.Input
- All Implemented Interfaces:
AttachNotifier,BlurNotifier<Input>,DetachNotifier,Focusable<Input>,FocusNotifier<Input>,HasAriaLabel,HasElement,HasEnabled,HasPlaceholder,HasSize,HasStyle,HasValue<AbstractField.ComponentValueChangeEvent<Input,,String>, String> HasValueAndElement<AbstractField.ComponentValueChangeEvent<Input,,String>, String> HasValueChangeMode,Serializable
@Tag("input")
public class Input
extends AbstractSinglePropertyField<Input,String>
implements Focusable<Input>, HasSize, HasStyle, HasValueChangeMode, HasAriaLabel, 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
AbstractField.ComponentValueChangeEvent<C extends Component,V extends Object> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
BlurNotifier.BlurEvent<C extends Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
FocusNotifier.FocusEvent<C extends Component>Nested classes/interfaces inherited from interface com.vaadin.flow.component.HasValue
HasValue.ValueChangeEvent<V extends Object>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>> -
Field Summary
Fields inherited from interface com.vaadin.flow.data.value.HasValueChangeMode
DEFAULT_CHANGE_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionInput()Creates a new input without any specific type, withON_CHANGEvalue change mode.Input(ValueChangeMode valueChangeMode) Creates a new input without any specific type. -
Method Summary
Modifier and TypeMethodDescriptiongetType()Gets the type of this input.intvoidsetPlaceholder(String placeholder) voidSets the type of this input.voidsetValueChangeMode(ValueChangeMode valueChangeMode) voidsetValueChangeTimeout(int valueChangeTimeout) Methods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsMethods 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, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.vaadin.flow.component.AttachNotifier
addAttachListenerMethods inherited from interface com.vaadin.flow.component.BlurNotifier
addBlurListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasAriaLabel
getAriaLabel, getAriaLabelledBy, setAriaLabel, setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
isEnabled, setEnabledMethods 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, setWidthFullMethods inherited from interface com.vaadin.flow.component.HasStyle
addClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.HasValue
clear, getOptionalValueMethods 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, withON_CHANGEvalue change mode. -
Input
Creates a new input without any specific type.- Parameters:
valueChangeMode- initial value change mode, ornullto disable the value synchronization
-
-
Method Details
-
setPlaceholder
- Specified by:
setPlaceholderin interfaceHasPlaceholder
-
getPlaceholder
- Specified by:
getPlaceholderin interfaceHasPlaceholder
-
setType
Sets the type of this input.- Parameters:
type- the type, notnull- See Also:
-
getType
Gets the type of this input.- Returns:
- the input type, by default "text"
-
getValueChangeMode
- Specified by:
getValueChangeModein interfaceHasValueChangeMode
-
setValueChangeMode
- Specified by:
setValueChangeModein interfaceHasValueChangeMode
-
setValueChangeTimeout
public void setValueChangeTimeout(int valueChangeTimeout) - Specified by:
setValueChangeTimeoutin interfaceHasValueChangeMode
-
getValueChangeTimeout
public int getValueChangeTimeout()The default value is
HasValueChangeMode.DEFAULT_CHANGE_TIMEOUT.- Specified by:
getValueChangeTimeoutin interfaceHasValueChangeMode
-