Class NumberFormatOptions


  • public class NumberFormatOptions
    extends Object
    Model class for the options used by our client-side $.xutil.numberFormat wrapper.
    Since:
    8.2.2
    • Method Detail

      • changeValueOnWheel

        public Boolean changeValueOnWheel()
        Whether the number value should be changed when the mouse wheel is used while the input field is focused.
        Returns:
        Whether to change the value on mouse wheel.
      • decimalPlaces

        public Integer decimalPlaces()
        Maximum number of decimal places to display, see also decimalPaddingMode().
        Returns:
        The number of decimal places.
      • decimalSeparator

        public NumberFormatOptions.DecimalSeparator decimalSeparator()
        Separator to use to separate the integer part of the number from the fractional part.
        Returns:
        The decimal separator to use.
      • emptyMode

        public NumberFormatOptions.EmptyMode emptyMode()
        Defines the behavior of the input field when it is empty.
        Returns:
        The empty mode.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • negativeSign

        public Character negativeSign()
        The sign used to indicate that a number is negative. Must be a single character. Must not be any of the numerical characters (digits).
        Returns:
        The negative sign.
      • positiveSign

        public Character positiveSign()
        The sign used to indicate that a number is positive. Must be a single character. Must not be any of the numerical characters (digits).
        Returns:
        The positive sign.
      • showPositiveSign

        public Boolean showPositiveSign()
        Whether to show the positive sign for positive numbers.
        Returns:
        Whether to show the positive sign.
      • toBuilder

        public NumberFormatOptions.Builder toBuilder()
        Creates a new builder initialized with the values of this options instance.
        Returns:
        A new builder initialized with the values of this options instance.
      • toJsonObject

        public com.alibaba.fastjson.JSONObject toJsonObject()
        Converts this options instance to a JSON object that can be used by the client.
        Returns:
        A JSON object representing this options instance.
      • unitSign

        public String unitSign()
        The unit sign to show before or after the number, see unit sign placement.
        Returns:
        The unit sign.
      • wheelStep

        public Double wheelStep()
        The step to use when changing the value with the mouse wheel. When null, uses an automatic step size based on the current settings and current value. Applicable only when changeValueOnWheel() is enabled.
        Returns:
        The wheel step.
      • defaults

        public static NumberFormatOptions defaults()
        Creates a new options instance with default values.
        Returns:
        A new options instance with default values.