Class LongField
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier, com.vaadin.flow.component.BlurNotifier<LongField>, com.vaadin.flow.component.CompositionNotifier, com.vaadin.flow.component.DetachNotifier, com.vaadin.flow.component.Focusable<LongField>, com.vaadin.flow.component.FocusNotifier<LongField>, com.vaadin.flow.component.HasAriaDescription, com.vaadin.flow.component.HasAriaLabel, com.vaadin.flow.component.HasElement, com.vaadin.flow.component.HasEnabled, com.vaadin.flow.component.HasHelper, com.vaadin.flow.component.HasLabel, com.vaadin.flow.component.HasPlaceholder, com.vaadin.flow.component.HasSize, com.vaadin.flow.component.HasStyle, com.vaadin.flow.component.HasValidation, com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<LongField, Long>, Long>, com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<LongField, Long>, Long>, com.vaadin.flow.component.InputNotifier, com.vaadin.flow.component.KeyNotifier, com.vaadin.flow.component.shared.HasClearButton, com.vaadin.flow.component.shared.HasPrefix, com.vaadin.flow.component.shared.HasSuffix, com.vaadin.flow.component.shared.HasTooltip, com.vaadin.flow.component.shared.HasValidationProperties, com.vaadin.flow.component.shared.InputField<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<LongField, Long>, Long>, com.vaadin.flow.component.textfield.HasAutocapitalize, com.vaadin.flow.component.textfield.HasAutocomplete, com.vaadin.flow.component.textfield.HasAutocorrect, com.vaadin.flow.data.binder.HasValidator<Long>, com.vaadin.flow.data.value.HasValueChangeMode, Serializable
- Direct Known Subclasses:
SJFormattedLongField
IntegerField. Extends
AbstractNumberField with a Long type parameter and a
Long.parseLong(String, int) parser; shares the vaadin-integer-field
web component so the client side still rejects decimals and shows the
familiar spinner-arrow chrome.
Lives in :surrogates as a plain Vaadin component — no Swing
surface, no mixin. Introduced to back SJSpinner when the
installed SpinnerNumberModel carries a Long value
without falling back to NumberField's double-mantissa
rounding, but general-purpose: any Vaadin code needing a long-typed
numeric field can use it directly.
Client-side precision: values up to 253 round-trip
exactly through the browser's native numeric input (JS numbers are
IEEE-754 doubles; integer-valued doubles stay exact up to 253).
Longs outside that range display with mantissa rounding on the wire,
but the server-side parser (unchanged Long.parseLong(String, int) on the
string form delivered via _inputElementValue) sees the exact
text the browser rendered, so round-trip precision depends on how
browsers format long integers — which today is exact for all values
the browser accepts via input[type=number].
Absolute min/max passed to the superclass use
Long.MIN_VALUE / Long.MAX_VALUE cast to double
(precision-lossy at the extremes, but the superclass removes those
properties from the DOM immediately after initialisation — they only
matter as signal defaults until a caller explicitly
setMin / setMax).
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class com.vaadin.flow.component.AbstractField
com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C,V> Nested classes/interfaces inherited from interface com.vaadin.flow.component.BlurNotifier
com.vaadin.flow.component.BlurNotifier.BlurEvent<C>Nested classes/interfaces inherited from interface com.vaadin.flow.component.FocusNotifier
com.vaadin.flow.component.FocusNotifier.FocusEvent<C>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> -
Field Summary
Fields inherited from interface com.vaadin.flow.component.textfield.HasAutocapitalize
AUTOCAPITALIZE_ATTRIBUTEFields inherited from interface com.vaadin.flow.component.textfield.HasAutocomplete
AUTOCOMPLETE_ATTRIBUTEFields inherited from interface com.vaadin.flow.component.textfield.HasAutocorrect
AUTOCORRECT_ATTRIBUTEFields inherited from interface com.vaadin.flow.data.value.HasValueChangeMode
DEFAULT_CHANGE_TIMEOUT -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class com.vaadin.flow.component.textfield.AbstractNumberField
addValidationStatusChangeListener, bindMaxInternal, bindMinInternal, getDefaultValidator, getEmptyValue, getI18n, getMaxDouble, getMinDouble, getStepDouble, getValue, isStepButtonsVisible, setI18n, setManualValidation, setMax, setMin, setModelValue, setStep, setStepButtonsVisible, setValue, setValueChangeMode, validateMethods inherited from class com.vaadin.flow.component.textfield.TextFieldBase
addToInput, addToPrefix, addToSuffix, getAriaDescribedBy, getAriaLabel, getAriaLabelledBy, getTitle, getValueChangeMode, getValueChangeTimeout, isAutofocus, isAutoselect, isRequired, isRequiredIndicatorVisible, setAriaDescribedBy, setAriaLabel, setAriaLabelledBy, setAutofocus, setAutoselect, setLabel, setRequired, setRequiredIndicatorVisible, setTitle, setValueChangeTimeoutMethods inherited from class com.vaadin.flow.component.AbstractSinglePropertyField
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventMethods inherited from class com.vaadin.flow.component.AbstractField
addValueChangeListener, bindValue, isEmpty, valueEqualsMethods inherited from class com.vaadin.flow.component.Component
addListener, bindVisible, findAncestor, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getListeners, getLocale, getParent, getTestId, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, setId, setTestId, setVisible, whenAttachedMethods inherited from class 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.CompositionNotifier
addCompositionEndListener, addCompositionStartListener, addCompositionUpdateListenerMethods inherited from interface com.vaadin.flow.component.DetachNotifier
addDetachListenerMethods inherited from interface com.vaadin.flow.component.Focusable
addFocusShortcut, blur, focus, focus, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods inherited from interface com.vaadin.flow.component.HasAriaDescription
setAriaDescribedByMethods inherited from interface com.vaadin.flow.component.HasAriaLabel
setAriaLabelledByMethods inherited from interface com.vaadin.flow.component.textfield.HasAutocapitalize
getAutocapitalize, setAutocapitalizeMethods inherited from interface com.vaadin.flow.component.textfield.HasAutocomplete
getAutocomplete, setAutocompleteMethods inherited from interface com.vaadin.flow.component.textfield.HasAutocorrect
isAutocorrect, setAutocorrectMethods inherited from interface com.vaadin.flow.component.shared.HasClearButton
bindClearButtonVisible, isClearButtonVisible, setClearButtonVisibleMethods inherited from interface com.vaadin.flow.component.HasElement
getElementMethods inherited from interface com.vaadin.flow.component.HasEnabled
bindEnabled, isEnabled, setEnabledMethods inherited from interface com.vaadin.flow.component.HasHelper
bindHelperText, getHelperComponent, getHelperText, setHelperComponent, setHelperTextMethods inherited from interface com.vaadin.flow.component.HasLabel
getLabelMethods inherited from interface com.vaadin.flow.component.HasPlaceholder
bindPlaceholder, getPlaceholder, setPlaceholderMethods inherited from interface com.vaadin.flow.component.shared.HasPrefix
getPrefixComponent, setPrefixComponentMethods inherited from interface com.vaadin.flow.component.HasSize
bindHeight, bindWidth, 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, bindClassName, bindClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNameMethods inherited from interface com.vaadin.flow.component.shared.HasSuffix
getSuffixComponent, setSuffixComponentMethods inherited from interface com.vaadin.flow.component.shared.HasTooltip
getTooltip, setTooltipMarkdown, setTooltipTextMethods inherited from interface com.vaadin.flow.component.shared.HasValidationProperties
getErrorMessage, isInvalid, setErrorMessage, setInvalidMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, bindValue, clear, getOptionalValue, isEmptyMethods inherited from interface com.vaadin.flow.component.HasValueAndElement
bindReadOnly, bindRequiredIndicatorVisible, isReadOnly, setReadOnlyMethods inherited from interface com.vaadin.flow.component.InputNotifier
addInputListenerMethods inherited from interface com.vaadin.flow.component.KeyNotifier
addKeyDownListener, addKeyDownListener, addKeyPressListener, addKeyPressListener, addKeyUpListener, addKeyUpListener
-
Constructor Details
-
LongField
public LongField() -
LongField
-
-
Method Details
-
setMin
public void setMin(long min) Sets the minimum value for the field. MirrorsIntegerField.setMinbut with alongargument. Routes toAbstractNumberField'sdouble-typed setter — precision is exact within [-253, 253] and lossy beyond that. -
getMin
public long getMin() -
setMax
public void setMax(long max) -
getMax
public long getMax() -
setStep
public void setStep(long step) Sets the spinner-arrow step. MirrorsIntegerField.setStep's positive-only contract — zero / negative throws IAE, matching the web component's expectation that step is strictly positive. -
getStep
public long getStep()
-