Interface INumberInputElement<I extends INumberInputElement,​ValueType>

    • Method Detail

      • getLocale

        @Nullable
        java.util.Locale getLocale()
        Returns the locale associated with this number input component

        Default: null, if Locales.getCurrent() is preferred

      • withLocale

        I withLocale​(@Nullable
                     java.util.Locale locale)
        Returns a copy of this immutable component with the specified locale.

        Sets the locale used to identify the symbols of this number input component.

        If the format of IFormatInputElement.getFormat() is null, the format is assumed from getDefaultFormat().

        Parameters:
        locale - The preferred locale

        Default: null, if Locales.getCurrent() is preferred.

        Returns:
        A modified copy of the this object
      • withLocale

        default I withLocale​(java.lang.String locale)
        Returns a copy of this immutable component with the specified locale.

        Sets the locale used to identify the symbols of this number input component.

        If the format of IFormatInputElement.getFormat() is null, the format is assumed from getDefaultFormat().

        Parameters:
        locale - The preferred locale

        Default: null, if Locales.getCurrent() is preferred.

        Returns:
        A modified copy of the this object
      • getCols

        default int getCols()
        Returns the cols which determines the visible width, in characters.

        Default: 11 (non-positive means the same as browser's default).

        Specified by:
        getCols in interface IInputElement<I extends INumberInputElement,​ValueType>
      • getRoundingMode

        default int getRoundingMode()
        Returns the rounding mode.

        Default: BigDecimal.ROUND_HALF_EVEN.

      • withRoundingMode

        I withRoundingMode​(int roundingMode)
        Returns a copy of this immutable component with the specified roundingMode.

        Sets the rounding mode.

        Parameters:
        roundingMode - The rounding mode. Allowed value: BigDecimal.ROUND_CEILING, BigDecimal.ROUND_DOWN, BigDecimal.ROUND_FLOOR, BigDecimal.ROUND_HALF_DOWN, BigDecimal.ROUND_HALF_UP, BigDecimal.ROUND_HALF_EVEN, BigDecimal.ROUND_UNNECESSARY and BigDecimal.ROUND_UP

        Default: BigDecimal.ROUND_HALF_EVEN.

        Returns:
        A modified copy of the this object