Interface IDecimalbox

All Superinterfaces:
IAnyGroup<IDecimalbox>, IChildrenOfInputgroup<IDecimalbox>, IComponent<IDecimalbox>, IFormatInputElement<IDecimalbox,BigDecimal>, IHtmlBasedComponent<IDecimalbox>, IInputElement<IDecimalbox,BigDecimal>, INumberInputElement<IDecimalbox,BigDecimal>, IReadonly<IDecimalbox>, IXulElement<IDecimalbox>

public interface IDecimalbox extends INumberInputElement<IDecimalbox,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
  • Field Details

    • DEFAULT

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

    • withValue

      IDecimalbox withValue(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,BigDecimal>
      Parameters:
      value - The value of the input component.

      Default: null.

      Returns:
      A modified copy of the this object
    • getWidgetClass

      default 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(BigDecimal value)
      Returns the instance with the given value.
      Parameters:
      value - The BigDecimal value
    • of

      static IDecimalbox of(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(String constraint)
      Returns the instance with the given constraint.
      Parameters:
      constraint - The decimalbox constraint
    • ofId

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