Class SuperLongField
java.lang.Object
com.vaadin.flow.component.Component
com.vaadin.flow.component.AbstractField<com.vaadin.flow.component.customfield.CustomField<T>,T>
com.vaadin.flow.component.customfield.CustomField<T>
org.vaadin.miki.superfields.numbers.AbstractSuperNumberField<Long,SuperLongField>
org.vaadin.miki.superfields.numbers.SuperLongField
- All Implemented Interfaces:
com.vaadin.flow.component.AttachNotifier,com.vaadin.flow.component.BlurNotifier<com.vaadin.flow.component.customfield.CustomField<Long>>,com.vaadin.flow.component.DetachNotifier,com.vaadin.flow.component.Focusable<com.vaadin.flow.component.customfield.CustomField<Long>>,com.vaadin.flow.component.FocusNotifier<com.vaadin.flow.component.customfield.CustomField<Long>>,com.vaadin.flow.component.HasElement,com.vaadin.flow.component.HasEnabled,com.vaadin.flow.component.HasHelper,com.vaadin.flow.component.HasLabel,com.vaadin.flow.component.HasSize,com.vaadin.flow.component.HasStyle,com.vaadin.flow.component.HasTheme,com.vaadin.flow.component.HasValidation,com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<Long>,,Long>, Long> com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<Long>,,Long>, Long> 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.data.value.HasValueChangeMode,Serializable,TextSelectionNotifier<SuperLongField>,CanReceiveSelectionEventsFromClient,CanSelectText,HasHelperPositionable,HasId,HasLabelPositionable,HasLocale,HasNullValueOptionallyAllowed<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<Long>,,Long>, Long> HasPlaceholder,HasRequired,HasTextInputMode,WithClearButtonMixin<SuperLongField>,WithHelperMixin<SuperLongField>,WithHelperPositionableMixin<SuperLongField>,WithIdMixin<SuperLongField>,WithLabelMixin<SuperLongField>,WithLabelPositionableMixin<SuperLongField>,WithLocaleMixin<SuperLongField>,WithNullValueOptionallyAllowedMixin<SuperLongField,,com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<Long>, Long>, Long> WithPlaceholderMixin<SuperLongField>,WithReceivingSelectionEventsFromClientMixin<SuperLongField>,WithRequiredMixin<SuperLongField>,WithTextInputModeMixin<SuperLongField>,WithTooltipMixin<SuperLongField>,WithValueMixin<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<com.vaadin.flow.component.customfield.CustomField<Long>,Long>, Long, SuperLongField>
@JsModule("./super-long-field.ts")
@Tag("super-long-field")
public class SuperLongField
extends AbstractSuperNumberField<Long,SuperLongField>
A field for
Long values that are properly formatted.- Since:
- 2020-04-07
- Author:
- miki
- 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 extends Object> 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 extends Object>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>> -
Field Summary
Fields inherited from interface org.vaadin.miki.markers.HasHelperPositionable
HELPER_ABOVE_THEME_VARIANTFields inherited from interface org.vaadin.miki.markers.HasLabelPositionable
LABEL_POSITION_ATTRIBUTE, LABEL_POSITION_DETAILS_ATTRIBUTEFields inherited from interface com.vaadin.flow.data.value.HasValueChangeMode
DEFAULT_CHANGE_TIMEOUT -
Constructor Summary
ConstructorsConstructorDescriptionConstructs the field with zero as default value, defaultLocaleand an empty label.SuperLongField(Long defaultValue, String label) Constructs the field with given default value and label, and with defaultLocale.SuperLongField(Long defaultValue, String label, Locale locale) Constructs the field.SuperLongField(String label) Constructs the field with zero as default value and defaultLocale.SuperLongField(String label, Locale locale) Constructs the field with zero as default value.SuperLongField(Locale locale) Constructs the field with zero as default value and an empty label. -
Method Summary
Modifier and TypeMethodDescriptionprotected LongparseRawValue(String rawValue, DecimalFormat format) Parses (somewhat) raw value from the text field into a proper typed value.voidsetDecimalFormat(DecimalFormat format) Sets the format definition used to displaying the value.Methods inherited from class org.vaadin.miki.superfields.numbers.AbstractSuperNumberField
addTextSelectionListener, addThemeVariants, blur, buildAllowedCharPattern, buildRegularExpression, focus, generateModelValue, getDecimalSeparatorAlternatives, getErrorMessage, getGroupingSeparatorAlternatives, getHelperComponent, getHelperText, getKeyboardDisallowedAlternatives, getLabel, getLabelPosition, getLocale, getNegativeSignAlternatives, getPlaceholder, getPrefixComponent, getRawValue, getRegexp, getSuffixComponent, getTextInputMode, getTooltip, getValueChangeMode, getValueChangeTimeout, isAutoselect, isClearButtonVisible, isFocused, isGroupingSeparatorHiddenOnFocus, isHelperAbove, isIntegerPartOptional, isInvalid, isNegativeValueAllowed, isNullValueAllowed, isOverlappingAlternatives, isReadOnly, isReceivingSelectionEventsFromClient, isRequired, isRequiredIndicatorVisible, removeThemeVariants, select, selectAll, selectNone, setAutoselect, setClearButtonVisible, setDecimalSeparatorAlternatives, setErrorMessage, setGroupingSeparatorAlternatives, setGroupingSeparatorHiddenOnFocus, setHelperAbove, setHelperAbove, setHelperBelow, setHelperComponent, setHelperText, setId, setIntegerPartOptional, setInvalid, setKeyboardDisallowedAlternatives, setLabel, setLabelPosition, setLocale, setMaximumFractionDigits, setMaximumIntegerDigits, setMinimumFractionDigits, setNegativeSignAlternatives, setNegativeValueAllowed, setNullValueAllowed, setOverlappingAlternatives, setPlaceholder, setPrefixComponent, setPresentationValue, setReadOnly, setReceivingSelectionEventsFromClient, setRequired, setRequiredIndicatorVisible, setSuffixComponent, setTextInputMode, setTooltipText, setValueChangeMode, setValueChangeTimeout, updateFieldValue, updateRegularExpression, updateRegularExpression, updateTextInputMode, withAutoselect, withDecimalSeparatorAlternatives, withDecimalSeparatorAlternatives, withGroupingSeparatorAlternatives, withGroupingSeparatorAlternatives, withGroupingSeparatorHiddenOnFocus, withKeyboardDisallowedAlternatives, withKeyboardDisallowedAlternatives, withMaximumIntegerDigits, withNegativeSignAlternatives, withNegativeSignAlternatives, withNegativeValueAllowed, withoutOverlappingAlternatives, withOverlappingAlternatives, withOverlappingAlternatives, withReceivingSelectionEventsFromClientMethods inherited from class com.vaadin.flow.component.customfield.CustomField
add, addThemeVariants, onAttach, remove, removeThemeVariants, updateValueMethods 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, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onDetach, onEnabledStateChanged, removeFromParent, scrollIntoView, scrollIntoView, set, setElement, 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, getTabIndex, setTabIndexMethods inherited from interface com.vaadin.flow.component.FocusNotifier
addFocusListenerMethods 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.HasTheme
addThemeName, addThemeNames, getThemeName, getThemeNames, hasThemeName, removeThemeName, removeThemeNames, setThemeName, setThemeNameMethods inherited from interface com.vaadin.flow.component.HasValue
addValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValueMethods inherited from interface org.vaadin.miki.markers.WithClearButtonMixin
withClearButtonVisibleMethods inherited from interface org.vaadin.miki.markers.WithHelperMixin
withHelperComponent, withHelperTextMethods inherited from interface org.vaadin.miki.markers.WithHelperPositionableMixin
withHelperAbove, withHelperAbove, withHelperBelowMethods inherited from interface org.vaadin.miki.markers.WithIdMixin
withIdMethods inherited from interface org.vaadin.miki.markers.WithLabelMixin
withLabelMethods inherited from interface org.vaadin.miki.markers.WithLabelPositionableMixin
withLabelPositionMethods inherited from interface org.vaadin.miki.markers.WithLocaleMixin
withLocaleMethods inherited from interface org.vaadin.miki.markers.WithNullValueOptionallyAllowedMixin
withNullValueAllowedMethods inherited from interface org.vaadin.miki.markers.WithPlaceholderMixin
withPlaceholderMethods inherited from interface org.vaadin.miki.markers.WithRequiredMixin
withoutRequired, withRequired, withRequiredMethods inherited from interface org.vaadin.miki.markers.WithTextInputModeMixin
withTextInputModeMethods inherited from interface org.vaadin.miki.markers.WithTooltipMixin
withTooltipTextMethods inherited from interface org.vaadin.miki.markers.WithValueMixin
withValue
-
Constructor Details
-
SuperLongField
public SuperLongField()Constructs the field with zero as default value, defaultLocaleand an empty label. -
SuperLongField
Constructs the field with zero as default value and an empty label.- Parameters:
locale- Locale to use for formatting.
-
SuperLongField
Constructs the field with zero as default value and defaultLocale.- Parameters:
label- Label that accompanies the field.
-
SuperLongField
Constructs the field with zero as default value.- Parameters:
label- Label that accompanies the field.locale- Locale to use for formatting.
-
SuperLongField
Constructs the field with given default value and label, and with defaultLocale.- Parameters:
defaultValue- Default value.label- Label that accompanies the field.
-
SuperLongField
Constructs the field.- Parameters:
defaultValue- Default value.label- Label that accompanies the field.locale- Locale to use for formatting.
-
-
Method Details
-
parseRawValue
Description copied from class:AbstractSuperNumberFieldParses (somewhat) raw value from the text field into a proper typed value.- Specified by:
parseRawValuein classAbstractSuperNumberField<Long,SuperLongField> - Parameters:
rawValue- Value from text field.format- Format to use.- Returns:
- Parsed value.
- Throws:
ParseException- When parsing goes wrong.
-
setDecimalFormat
Description copied from class:AbstractSuperNumberFieldSets the format definition used to displaying the value. Note: subclasses may overwrite the data in the format to make sure it follows type-specific constraints. Also note: changes to the format object may result in unpredictable behaviour of this component.- Overrides:
setDecimalFormatin classAbstractSuperNumberField<Long,SuperLongField> - Parameters:
format-DecimalFormatto use. Whennull,NumberFormat.getNumberInstance()will be used.
-