T - Type of number.SELF - Self type.public abstract class AbstractSuperFloatingPointField<T extends Number,SELF extends AbstractSuperFloatingPointField<T,SELF>> extends AbstractSuperNumberField<T,SELF>
AbstractSuperNumberField that allow modifications to minimum and maximum number of fraction digits.
Those methods by default are hidden from public access.com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>com.vaadin.flow.component.HasValue.ValueChangeEvent<V>, com.vaadin.flow.component.HasValue.ValueChangeListener<E extends com.vaadin.flow.component.HasValue.ValueChangeEvent<?>>DEFAULT_CHANGE_TIMEOUTHELPER_ABOVE_THEME_VARIANTLABEL_POSITION_ATTRIBUTE, LABEL_POSITION_DETAILS_ATTRIBUTE| Modifier | Constructor and Description |
|---|---|
protected |
AbstractSuperFloatingPointField(T defaultValue,
com.vaadin.flow.function.SerializablePredicate<T> negativityPredicate,
com.vaadin.flow.function.SerializableFunction<T,T> turnToPositiveOperator,
String label,
Locale locale,
int maxFractionDigits)
Creates the field.
|
| Modifier and Type | Method and Description |
|---|---|
Set<Character> |
getDecimalSeparatorAlternatives()
Returns the currently accepted alternatives to the decimal separator.
|
boolean |
isIntegerPartOptional()
Checks whether the integer part of a floating-point number is optional.
|
void |
setDecimalSeparatorAlternatives(Set<Character> alternatives)
Sets decimal separator alternatives, replacing previously existing ones.
|
void |
setIntegerPartOptional(boolean required)
Sets whether the integer part of a floating-point number is optional.
|
void |
setMaximumFractionDigits(int digits)
Sets the maximum number of fraction digits displayed and allowed.
|
void |
setMinimumFractionDigits(int digits)
Sets the minimum number of fraction digits displayed.
|
SELF |
withIntegerPartOptional()
Chains
setIntegerPartOptional(boolean) with true as parameter and returns itself. |
SELF |
withIntegerPartOptional(boolean optional)
Chains
setIntegerPartOptional(boolean) and returns itself. |
SELF |
withIntegerPartRequired()
Chains
setIntegerPartOptional(boolean) with false as parameter and returns itself. |
SELF |
withMaximumFractionDigits(int digits)
Chains
setMaximumFractionDigits(int) and returns itself. |
SELF |
withMinimumFractionDigits(int digits)
Chains
setMinimumFractionDigits(int) and returns itself. |
addTextSelectionListener, addThemeVariants, blur, buildAllowedCharPattern, buildRegularExpression, focus, generateModelValue, getErrorMessage, getGroupingSeparatorAlternatives, getHelperComponent, getHelperText, getLabel, getLabelPosition, getLocale, getNegativeSignAlternatives, getPlaceholder, getPrefixComponent, getRawValue, getRegexp, getSuffixComponent, getTextInputMode, getTooltipText, getValueChangeMode, getValueChangeTimeout, isAutoselect, isClearButtonVisible, isFocused, isGroupingSeparatorHiddenOnFocus, isHelperAbove, isInvalid, isNegativeValueAllowed, isNullValueAllowed, isOverlappingAlternatives, isPreventingInvalidInput, isReadOnly, isReceivingSelectionEventsFromClient, isRequired, isRequiredIndicatorVisible, parseRawValue, removeThemeVariants, select, selectAll, selectNone, setAutoselect, setClearButtonVisible, setDecimalFormat, setErrorMessage, setGroupingSeparatorAlternatives, setGroupingSeparatorHiddenOnFocus, setHelperAbove, setHelperAbove, setHelperBelow, setHelperComponent, setHelperText, setId, setInvalid, setLabel, setLabelPosition, setLocale, setMaximumIntegerDigits, setNegativeSignAlternatives, setNegativeValueAllowed, setNullValueAllowed, setOverlappingAlternatives, setPlaceholder, setPrefixComponent, setPresentationValue, setPreventingInvalidInput, setReadOnly, setReceivingSelectionEventsFromClient, setRequired, setRequiredIndicatorVisible, setSuffixComponent, setTextInputMode, setTooltipText, setValueChangeMode, setValueChangeTimeout, updateFieldValue, updateRegularExpression, updateRegularExpression, updateTextInputMode, withAutoselect, withDecimalSeparatorAlternatives, withDecimalSeparatorAlternatives, withGroupingSeparatorAlternatives, withGroupingSeparatorAlternatives, withGroupingSeparatorHiddenOnFocus, withMaximumIntegerDigits, withNegativeSignAlternatives, withNegativeSignAlternatives, withNegativeValueAllowed, withoutOverlappingAlternatives, withOverlappingAlternatives, withOverlappingAlternatives, withReceivingSelectionEventsFromClientadd, remove, updateValueaddValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getParent, getTranslation, getTranslation, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, onAttach, onDetach, onEnabledStateChanged, set, setElement, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwithoutReceivingSelectionEventsFromClient, withReceivingSelectionEventsFromClientaddClassName, addClassNames, getClassName, getClassNames, getStyle, hasClassName, removeClassName, removeClassNames, setClassName, setClassNamewithLocalewithLabelwithPlaceholderwithValuewithIdwithNullValueAllowed, withNullValueAllowed, withoutNullValueAllowedaddValueChangeListener, clear, getEmptyValue, getOptionalValue, getValue, isEmpty, setValuewithHelperComponent, withHelperTextwithHelperAbove, withHelperAbove, withHelperBelowwithClearButtonVisible, withClearButtonVisible, withoutClearButtonVisiblewithoutRequired, withRequired, withRequiredwithLabelPositionwithTooltipTextwithTextInputModewithoutPreventingInvalidInput, withPreventingInvalidInput, withPreventingInvalidInputgetCssSize, getHeight, getHeightUnit, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, getWidthUnit, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFullprotected AbstractSuperFloatingPointField(T defaultValue, com.vaadin.flow.function.SerializablePredicate<T> negativityPredicate, com.vaadin.flow.function.SerializableFunction<T,T> turnToPositiveOperator, String label, Locale locale, int maxFractionDigits)
defaultValue - Default value to use on startup and when there are errors.negativityPredicate - Check for whether or not given value is negative.turnToPositiveOperator - Operation to turn number into a positive one.label - Label of the field.locale - Locale to use.maxFractionDigits - Max number of fraction digits. Overwrites the settings in format obtained based on locale.public void setMinimumFractionDigits(int digits)
AbstractSuperNumberFieldDecimalFormat.
Will be overwritten by calls to AbstractSuperNumberField.setDecimalFormat(DecimalFormat). Calls to AbstractSuperNumberField.setLocale(Locale) will preserve this value.
Note: this is non-destructive, the underlying value of the field will not change (even though the representation will).setMinimumFractionDigits in class AbstractSuperNumberField<T extends Number,SELF extends AbstractSuperFloatingPointField<T,SELF>>digits - Number of digits to use.public void setMaximumFractionDigits(int digits)
AbstractSuperNumberFieldDecimalFormat.
Will be overwritten by calls to AbstractSuperNumberField.setDecimalFormat(DecimalFormat). Calls to AbstractSuperNumberField.setLocale(Locale) will preserve this value.
Note: this is non-destructive, the underlying value of the field will not change (even though the representation will).setMaximumFractionDigits in class AbstractSuperNumberField<T extends Number,SELF extends AbstractSuperFloatingPointField<T,SELF>>digits - Number of digits to use.public final SELF withMinimumFractionDigits(int digits)
setMinimumFractionDigits(int) and returns itself.digits - Minimum number of digits to set.public final SELF withMaximumFractionDigits(int digits)
setMaximumFractionDigits(int) and returns itself.digits - Maximum number of digits to set.public void setIntegerPartOptional(boolean required)
AbstractSuperNumberFieldsetIntegerPartOptional in class AbstractSuperNumberField<T extends Number,SELF extends AbstractSuperFloatingPointField<T,SELF>>required - Whether the integer part is optional.public boolean isIntegerPartOptional()
AbstractSuperNumberFieldisIntegerPartOptional in class AbstractSuperNumberField<T extends Number,SELF extends AbstractSuperFloatingPointField<T,SELF>>false by default - integer part is required).public final SELF withIntegerPartOptional(boolean optional)
setIntegerPartOptional(boolean) and returns itself.optional - Whether the required part is optional or not (default).public final SELF withIntegerPartRequired()
setIntegerPartOptional(boolean) with false as parameter and returns itself.public final SELF withIntegerPartOptional()
setIntegerPartOptional(boolean) with true as parameter and returns itself.public Set<Character> getDecimalSeparatorAlternatives()
AbstractSuperNumberFieldgetDecimalSeparatorAlternatives in class AbstractSuperNumberField<T extends Number,SELF extends AbstractSuperFloatingPointField<T,SELF>>null, but possibly empty.public void setDecimalSeparatorAlternatives(Set<Character> alternatives)
AbstractSuperNumberFieldsetDecimalSeparatorAlternatives in class AbstractSuperNumberField<T extends Number,SELF extends AbstractSuperFloatingPointField<T,SELF>>alternatives - Any alternatives that are identical to the already used separators or negative sign or their alternatives are ignored.Copyright © 2023 Miki. All rights reserved.