Class NumberFormatOptions

java.lang.Object
de.xima.fc.form.common.number_format.NumberFormatOptions

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

    • 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.
    • decimalPaddingMode

      public NumberFormatOptions.DecimalPaddingMode decimalPaddingMode()
      Whether to pad decimals with zeroes, up to the number of decimal places, see decimalPlaces().
      Returns:
      The decimal padding mode.
    • 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.
    • digitGroupMode

      public NumberFormatOptions.DigitGroupMode digitGroupMode()
      How to group digits in the integer part of the number.
      Returns:
      The digit group mode.
    • digitGroupSeparator

      public NumberFormatOptions.DigitGroupSeparator digitGroupSeparator()
      Separator to use between digit groups.
      Returns:
      The digit group separator.
    • emptyMode

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

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

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

      public NumberFormatOptions.LeadingZeroMode leadingZeroMode()
      Defines how to treat leading zeroes, e.g. `003512`.
      Returns:
      The leading zero mode.
    • 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.
    • roundingMode

      public NumberFormatOptions.RoundingMode roundingMode()
      The mode to use when rounding numbers.
      Returns:
      The rounding mode.
    • showPositiveSign

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

      public NumberFormatOptions.SignumSignPlacement signumSignPlacement()
      Where to place the signum sign that indicates whether a number is positive or negative. See also negative sign and positive sign.
      Returns:
      The signum sign placement.
    • 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.
    • unitSignPlacement

      public NumberFormatOptions.UnitSignPlacement unitSignPlacement()
      Where to place the unit sign, if any.
      Returns:
      The unit sign placement.
    • 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.
    • builder

      public static NumberFormatOptions.Builder builder()
      Creates a new builder for NumberFormatOptions.
      Returns:
      A new builder for NumberFormatOptions.
    • builderWithDefaults

      public static NumberFormatOptions.Builder builderWithDefaults()
      Creates a new builder for NumberFormatOptions that applies the defaults to all options that are not set.
      Returns:
      A new builder for NumberFormatOptions.
    • defaults

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