@Tag(value="vaadin-number-field")
@NpmPackage(value="@vaadin/vaadin-text-field",
version="2.10.0")
@JsModule(value="@vaadin/vaadin-text-field/src/vaadin-number-field.js")
public abstract class GeneratedVaadinNumberField<R extends GeneratedVaadinNumberField<R,T>,T>
extends GeneratedVaadinTextField<R,T>
implements com.vaadin.flow.component.HasStyle
Description copied from corresponding location in WebComponent:
<vaadin-number-field> is a Polymer 2 element for number field control
in forms.
<vaadin-number-field label="Number"> </vaadin-number-field>
GeneratedVaadinTextField.ChangeEvent<R extends GeneratedVaadinTextField<R,?>>, GeneratedVaadinTextField.InvalidChangeEvent<R extends GeneratedVaadinTextField<R,?>>com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>com.vaadin.flow.component.BlurNotifier.BlurEvent<C extends com.vaadin.flow.component.Component>| Constructor and Description |
|---|
GeneratedVaadinNumberField()
Default constructor.
|
GeneratedVaadinNumberField(T initialValue,
T defaultValue,
boolean acceptNullValues)
Constructs a new GeneratedVaadinNumberField component with the given
arguments.
|
GeneratedVaadinNumberField(T initialValue,
T defaultValue,
Class<P> elementPropertyType,
com.vaadin.flow.function.SerializableBiFunction<R,P,T> presentationToModel,
com.vaadin.flow.function.SerializableBiFunction<R,T,P> modelToPresentation)
Constructs a new GeneratedVaadinNumberField component with the given
arguments.
|
GeneratedVaadinNumberField(T initialValue,
T defaultValue,
Class<P> elementPropertyType,
com.vaadin.flow.function.SerializableFunction<P,T> presentationToModel,
com.vaadin.flow.function.SerializableFunction<T,P> modelToPresentation)
Constructs a new GeneratedVaadinNumberField component with the given
arguments.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
checkValidity()
Description copied from corresponding location in WebComponent:
|
protected double |
getMaxDouble()
Description copied from corresponding location in WebComponent:
|
protected double |
getMinDouble()
Description copied from corresponding location in WebComponent:
|
protected double |
getStepDouble()
Description copied from corresponding location in WebComponent:
|
protected boolean |
hasControlsBoolean()
Description copied from corresponding location in WebComponent:
|
protected void |
setHasControls(boolean hasControls)
Description copied from corresponding location in WebComponent:
|
protected void |
setMax(double max)
Description copied from corresponding location in WebComponent:
|
protected void |
setMin(double min)
Description copied from corresponding location in WebComponent:
|
protected void |
setStep(double step)
Description copied from corresponding location in WebComponent:
|
addChangeListener, addInvalidChangeListener, addThemeVariants, addToInput, addToPrefix, addToSuffix, getAutocapitalizeString, getAutocompleteString, getAutocorrectString, getErrorMessageString, getLabelString, getListString, getMaxlengthDouble, getMinlengthDouble, getNameString, getPatternString, getPlaceholderString, getTitleString, isAutofocusBoolean, isAutoselectBoolean, isClearButtonVisibleBoolean, isDisabledBoolean, isInvalidBoolean, isPreventInvalidInputBoolean, isReadonlyBoolean, isRequiredBoolean, remove, removeAll, removeThemeVariants, setAutocapitalize, setAutocomplete, setAutocorrect, setAutofocus, setAutoselect, setClearButtonVisible, setDisabled, setErrorMessage, setInvalid, setLabel, setList, setMaxlength, setMinlength, setName, setPattern, setPlaceholder, setPreventInvalidInput, setReadonly, setRequired, setTitle, validategetSynchronizationRegistration, 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, waitaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameaddFocusShortcut, blur, focus, getTabIndex, setTabIndexaddThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNamepublic GeneratedVaadinNumberField(T initialValue, T defaultValue, Class<P> elementPropertyType, com.vaadin.flow.function.SerializableFunction<P,T> presentationToModel, com.vaadin.flow.function.SerializableFunction<T,P> modelToPresentation)
P - the property typeinitialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedelementPropertyType - the type of the element propertypresentationToModel - a function that converts a string value to a model valuemodelToPresentation - a function that converts a model value to a string valuepublic GeneratedVaadinNumberField(T initialValue, T defaultValue, boolean acceptNullValues)
initialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedacceptNullValues - whether null is accepted as a model valuepublic GeneratedVaadinNumberField(T initialValue, T defaultValue, Class<P> elementPropertyType, com.vaadin.flow.function.SerializableBiFunction<R,P,T> presentationToModel, com.vaadin.flow.function.SerializableBiFunction<R,T,P> modelToPresentation)
P - the property typeinitialValue - the initial value to set to the valuedefaultValue - the default value to use if the value isn't definedelementPropertyType - the type of the element propertypresentationToModel - a function that accepts this component and a property value
and returns a model valuemodelToPresentation - a function that accepts this component and a model value and
returns a property valuepublic GeneratedVaadinNumberField()
protected boolean hasControlsBoolean()
Description copied from corresponding location in WebComponent:
Set to true to display value increase/decrease controls.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
hasControls property from the webcomponentprotected void setHasControls(boolean hasControls)
Description copied from corresponding location in WebComponent:
Set to true to display value increase/decrease controls.
hasControls - the boolean value to setprotected double getMinDouble()
Description copied from corresponding location in WebComponent:
The minimum value of the field.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
min property from the webcomponentprotected void setMin(double min)
Description copied from corresponding location in WebComponent:
The minimum value of the field.
min - the double value to setprotected double getMaxDouble()
Description copied from corresponding location in WebComponent:
The maximum value of the field.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
max property from the webcomponentprotected void setMax(double max)
Description copied from corresponding location in WebComponent:
The maximum value of the field.
max - the double value to setprotected double getStepDouble()
Description copied from corresponding location in WebComponent:
Specifies the allowed number intervals of the field.
This property is not synchronized automatically from the client side, so the returned value may not be the same as in client side.
step property from the webcomponentprotected void setStep(double step)
Description copied from corresponding location in WebComponent:
Specifies the allowed number intervals of the field.
step - the double value to setprotected void checkValidity()
GeneratedVaadinTextFieldDescription copied from corresponding location in WebComponent:
Returns true if the current input value satisfies all constraints (if any)
This function is not supported by Flow because it returns a
boolean. Functions with return types different than void are
not supported at this moment.
checkValidity in class GeneratedVaadinTextField<R extends GeneratedVaadinNumberField<R,T>,T>Copyright © 2025. All rights reserved.