@Tag(value="input") public class Input extends AbstractSinglePropertyField<Input,String> implements Focusable<Input>, HasSize, HasStyle, HasValueChangeMode
<input> element.AbstractField.ComponentValueChangeEvent<C extends Component,V>BlurNotifier.BlurEvent<C extends Component>FocusNotifier.FocusEvent<C extends Component>HasValue.ValueChangeEvent<V>, HasValue.ValueChangeListener<E extends HasValue.ValueChangeEvent<?>>DEFAULT_CHANGE_TIMEOUT| Constructor and Description |
|---|
Input()
Creates a new input without any specific type, with
ON_CHANGE value change mode. |
Input(ValueChangeMode valueChangeMode)
Creates a new input without any specific type.
|
| Modifier and Type | Method and Description |
|---|---|
Optional<String> |
getPlaceholder()
Gets the placeholder text.
|
String |
getType()
Gets the type of this input.
|
ValueChangeMode |
getValueChangeMode() |
int |
getValueChangeTimeout() |
void |
setPlaceholder(String placeholder)
Sets the placeholder text that is shown if the input is empty.
|
void |
setType(String type)
Sets the type of this input.
|
void |
setValueChangeMode(ValueChangeMode valueChangeMode) |
void |
setValueChangeTimeout(int valueChangeTimeout) |
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventaddValueChangeListener, 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, waitaddFocusShortcut, blur, focus, getTabIndex, setTabIndexaddBlurListeneraddFocusListenerisEnabled, setEnabledgetElementgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFulladdClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameisReadOnly, isRequiredIndicatorVisible, setReadOnly, setRequiredIndicatorVisibleclear, getOptionalValueaddAttachListeneraddDetachListenerpublic Input()
ON_CHANGE value change mode.public Input(ValueChangeMode valueChangeMode)
valueChangeMode - initial value change mode, or null to disable the
value synchronizationpublic void setPlaceholder(String placeholder)
placeholder - the placeholder text to set, or null to remove
the placeholderpublic Optional<String> getPlaceholder()
setPlaceholder(String)public void setType(String type)
type - the type, not nullpublic String getType()
public ValueChangeMode getValueChangeMode()
getValueChangeMode in interface HasValueChangeModepublic void setValueChangeMode(ValueChangeMode valueChangeMode)
setValueChangeMode in interface HasValueChangeModepublic void setValueChangeTimeout(int valueChangeTimeout)
setValueChangeTimeout in interface HasValueChangeModepublic int getValueChangeTimeout()
The default value is HasValueChangeMode.DEFAULT_CHANGE_TIMEOUT.
getValueChangeTimeout in interface HasValueChangeModeCopyright © 2000–2025 Vaadin Ltd. All rights reserved.