Interface IDecimalbox

    • Field Detail

      • DEFAULT

        static final IDecimalbox DEFAULT
        Constant for default attributes of this immutable component.
    • Method Detail

      • withValue

        IDecimalbox withValue​(java.math.BigDecimal value)
        Description copied from interface: IInputElement
        Returns a copy of this immutable component with the specified value.

        Sets the value of the input component.

        Specified by:
        withValue in interface IInputElement<IDecimalbox,​java.math.BigDecimal>
        Parameters:
        value - The value of the input component.

        Default: null.

        Returns:
        A modified copy of the this object
      • getWidgetClass

        default java.lang.String getWidgetClass()
        Returns the client widget class.

        Default: "zul.inp.Decimalbox"

        Specified by:
        getWidgetClass in interface IComponent<IDecimalbox>
      • getScale

        default int getScale()
        Returns the scale for the decimal number storing in this component, or Decimalbox.AUTO if the scale is decided automatically (based on what user has entered).

        Default: Decimalbox.AUTO.

      • withScale

        IDecimalbox withScale​(int scale)
        Returns a copy of this immutable component with the specified scale.

        Sets the scale for the decimal number storing in this component, or Decimalbox.AUTO if the scale is decided automatically (based on what user has entered).

        For example, set the scale of 1234.1234 to 2, the result will be 1234.12

        Parameters:
        scale - The scale for the decimal number storing in this component

        Default: Decimalbox.AUTO.

        Returns:
        A modified copy of the this object
      • of

        static IDecimalbox of​(java.math.BigDecimal value)
        Returns the instance with the given value.
        Parameters:
        value - The BigDecimal value
      • of

        static IDecimalbox of​(java.lang.String value)
        Returns the instance with the given value.
        Parameters:
        value - The string value of the decimalbox
      • ofCols

        static IDecimalbox ofCols​(int cols)
        Returns the instance with the given cols.
        Parameters:
        cols - The cols which determines the visible width
      • ofConstraint

        static IDecimalbox ofConstraint​(java.lang.String constraint)
        Returns the instance with the given constraint.
        Parameters:
        constraint - The decimalbox constraint
      • ofId

        static IDecimalbox ofId​(java.lang.String id)
        Returns the instance with the given id.
        Parameters:
        id - The id to identify this component