Package org.zkoss.stateless.sul

## Interface IDecimalbox

- All Superinterfaces:
    `IAnyGroup<IDecimalbox>`, `IChildrenOfInputgroup<IDecimalbox>`, `IComponent<IDecimalbox>`, `IFormatInputElement<IDecimalbox,​java.math.BigDecimal>`, `IHtmlBasedComponent<IDecimalbox>`, `IInputElement<IDecimalbox,​java.math.BigDecimal>`, `INumberInputElement<IDecimalbox,​java.math.BigDecimal>`, `IReadonly<IDecimalbox>`, `IXulElement<IDecimalbox>`

      public interface IDecimalbox
      extends INumberInputElement<IDecimalbox,​java.math.BigDecimal>, IAnyGroup<IDecimalbox>

  Immutable `Decimalbox` component.

  An edit box for holding BigDecimal.

  ## Constraint

  You could specify what value to accept for input controls by use of the `constraint` attribute. It could be a combination of `no positive`, `no negative`, `no zero`, and `no empty`.

  Author:
    katherine
  See Also:
    `Decimalbox`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `IDecimalbox.Builder` | Builds instances of type `IDecimalbox`.
    `static class` | `IDecimalbox.Updater` | Builds an updater of type `IDecimalbox` for `UiAgent.smartUpdate(Locator, SmartUpdater)`.

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static IDecimalbox` | `DEFAULT` | Constant for default attributes of this immutable component.

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `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 java.lang.String` | `getWidgetClass()` | Returns the client widget class.
    `static IDecimalbox` | `of​(java.lang.String value)` | Returns the instance with the given value.
    `static IDecimalbox` | `of​(java.math.BigDecimal value)` | Returns the instance with the given value.
    `static IDecimalbox` | `ofCols​(int cols)` | Returns the instance with the given cols.
    `static IDecimalbox` | `ofConstraint​(java.lang.String constraint)` | Returns the instance with the given constraint.
    `static IDecimalbox` | `ofId​(java.lang.String id)` | Returns the instance with the given id.
    `IDecimalbox` | `withScale​(int scale)` | Returns a copy of `this` immutable component with the specified `scale`.
    `IDecimalbox` | `withValue​(java.math.BigDecimal value)` | Returns a copy of `this` immutable component with the specified `value`.

    - ### Methods inherited from interface org.zkoss.stateless.sul.IComponent

      `getAction, getActions, getClientAttributes, getId, getMold, getWidgetListeners, getWidgetOverrides, isVisible, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withAction, withActions, withActions, withClientAttribute, withClientAttributes, withId, withMold, withVisible, withWidgetClass, withWidgetListener, withWidgetListeners, withWidgetOverride, withWidgetOverrides`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IFormatInputElement

      `getFormat, withFormat`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IHtmlBasedComponent

      `getClientAction, getDraggable, getDroppable, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZIndex, isFocus, withClientAction, withDraggable, withDroppable, withFocus, withHeight, withHflex, withLeft, withRenderdefer, withSclass, withStyle, withTabindex, withTabindex, withTooltiptext, withTop, withVflex, withWidth, withZclass, withZIndex`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IInputElement

      `getConstraint, getErrorboxIconSclass, getErrorboxSclass, getErrorMessage, getInputAttributes, getInstant, getMaxlength, getName, getPlaceholder, getValue, isDisabled, isInplace, withCols, withConstraint, withDisabled, withErrorboxIconSclass, withErrorboxSclass, withErrorMessage, withInplace, withInputAttributes, withInstant, withMaxlength, withName, withPlaceholder`

    - ### Methods inherited from interface org.zkoss.stateless.sul.INumberInputElement

      `getCols, getLocale, getRoundingMode, withLocale, withLocale, withRoundingMode`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IReadonly

      `isReadonly, withReadonly`

    - ### Methods inherited from interface org.zkoss.stateless.sul.IXulElement

      `getContext, getCtrlKeys, getPopup, getTooltip, withContext, withCtrlKeys, withPopup, withTooltip`

- - ### 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