Interface ISpinner

All Superinterfaces:
IAnyGroup<ISpinner>, IChildrenOfInputgroup<ISpinner>, IComponent<ISpinner>, IFormatInputElement<ISpinner,Integer>, IHtmlBasedComponent<ISpinner>, IInputElement<ISpinner,Integer>, INumberInputElement<ISpinner,Integer>, IReadonly<ISpinner>, IXulElement<ISpinner>

public interface ISpinner extends INumberInputElement<ISpinner,Integer>, IAnyGroup<ISpinner>
Immutable Spinner component

An edit box for holding a constrained integer.

Constraint

You could specify what value to accept for input controls by use of the constraint attribute. It could be a combination of no empty and the min (minimum) and max (maximum) to spinner.}.

For example,

 
 ISpinner.ofConstraint("no empty, min -2 max 6: between -2 to 6");
 
 

Author:
katherine
See Also:
  • Spinner
  • Field Details

    • DEFAULT

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

    • withValue

      ISpinner withValue(Integer 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<ISpinner,Integer>
      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.Spinner"

      Specified by:
      getWidgetClass in interface IComponent<ISpinner>
    • getStep

      default int getStep()
      Returns the step of spinner

      Default: 1

    • withStep

      ISpinner withStep(int step)
      Returns a copy of this immutable component with the specified step.

      Sets the step of spinner

      Parameters:
      step - The step of the spinner

      Default: 1.

      Returns:
      A modified copy of the this object
    • isButtonVisible

      default boolean isButtonVisible()
      Returns whether the button (on the right of the spinner) is visible.

      Default: true.

    • withButtonVisible

      ISpinner withButtonVisible(boolean buttonVisible)
      Returns a copy of this immutable component with the specified buttonVisible.

      Sets whether the button (on the right of the spinner) is visible.

      Parameters:
      buttonVisible - false to disable the button visibility.

      Default: true.

      Returns:
      A modified copy of the this object
    • of

      static ISpinner of(Integer value)
      Returns the instance with the given value.
      Parameters:
      value - The integer value of the spinner
    • of

      static ISpinner of(int value)
      Returns the instance with the given value.
      Parameters:
      value - The integer value of the spinner
    • ofCols

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

      static ISpinner ofConstraint(String constraint)
      Returns the instance with the given constraint.
      Parameters:
      constraint - The spinner constraint
    • ofId

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