Package org.zkoss.stateless.sul

## Interface ITextboxBase<I extends ITextboxBase>

- All Superinterfaces:
    `IChildrenOfInputgroup<I>`, `IComponent<I>`, `IHtmlBasedComponent<I>`, `IInputElement<I,​java.lang.String>`, `IReadonly<I>`, `IXulElement<I>`
  All Known Subinterfaces:
    `IBandbox`, `ICombobox`, `ITextbox`

      public interface ITextboxBase<I extends ITextboxBase>
      extends IInputElement<I,​java.lang.String>

  Immutable `Textbox` base component.
  Author:
    jumperchen

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface | Description
    --- | --- | ---
    `static class` | `ITextboxBase.Type` | Specifies the values to the textbox's type.

  - ### Method Summary

    All Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `default int` | `getRows()` | Returns the rows.
    `default java.lang.String` | `getType()` | Returns the type.
    `default boolean` | `isMultiline()` | Returns whether it is multiline.
    `default boolean` | `isSubmitByEnter()` | Returns whether it is submitByEnter, If submitByEnter is true, press enter will fire onOK event instead of move to next line, you should press shift + enter if you want to move to next line.
    `default boolean` | `isTabbable()` | Returns whether TAB is allowed.
    `I` | `withMultiline​(boolean multiline)` | Returns a copy of `this` immutable component with the specified `multiline`.
    `I` | `withRows​(int rows)` | Returns a copy of `this` immutable component with the specified `rows`.
    `I` | `withSubmitByEnter​(boolean submitByEnter)` | Returns a copy of `this` immutable component with the specified `submitByEnter`.
    `I` | `withTabbable​(boolean tabbable)` | Returns a copy of `this` immutable component with the specified `tabbable`.
    `I` | `withType​(java.lang.String type)` | Returns a copy of `this` immutable component with the specified `type`.
    `default I` | `withType​(ITextboxBase.Type type)` | Returns a copy of `this` immutable component with the specified `type`.
    `I` | `withValue​(java.lang.String 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, getWidgetClass, 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.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

      `getCols, 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.IReadonly

      `isReadonly, withReadonly`

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

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

- - ### Method Detail

    - #### withValue

          I withValue​(@Nullable
                      java.lang.String 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<I extends ITextboxBase,​java.lang.String>`
      Parameters:
        `value` - The value of the input component.

        Default: `null`.

      Returns:
        A modified copy of the `this` object

    - #### isMultiline

          default boolean isMultiline()

      Returns whether it is multiline.

      Default: `false`.

    - #### withMultiline

          I withMultiline​(boolean multiline)

      Returns a copy of `this` immutable component with the specified `multiline`.

      Sets whether it is multiline.

      Parameters:
        `multiline` - `true` to enable multiline.

        Default: `false`.

      Returns:
        A modified copy of the `this` object

    - #### getRows

          default int getRows()

      Returns the rows.

      Default: `1`.

    - #### withRows

          I withRows​(int rows)

      Returns a copy of `this` immutable component with the specified `rows`.

      Sets the rows.

      Note: Not allowed to set rows and height/vflex at the same time

      Parameters:
        `rows` - The number of the row to display.

        Default: `1`.

      Returns:
        A modified copy of the `this` object

    - #### isTabbable

          default boolean isTabbable()

      Returns whether TAB is allowed. If true, the user can enter TAB in the textbox, rather than change focus.

      Default: `false`.

    - #### withTabbable

          I withTabbable​(boolean tabbable)

      Returns a copy of `this` immutable component with the specified `tabbable`.

      Sets whether TAB is allowed. If true, the user can enter TAB in the textbox, rather than change focus.

      Parameters:
        `tabbable` - `true` to enable TAB in the textbox.

        Default: `false`.

      Returns:
        A modified copy of the `this` object

    - #### getType

          default java.lang.String getType()

      Returns the type.

      Default: `"text"`.

    - #### withType

          I withType​(java.lang.String type)

      Returns a copy of `this` immutable component with the specified `type`.

      Sets the type of the textbox. Acceptable values are `"text"`, `"password"`, `"tel"`, `"email"`, and `"url"`

      Parameters:
        `type` - The type of the textbox.

        Default: `"text"`.

      Returns:
        A modified copy of the `this` object

    - #### withType

          default I withType​(ITextboxBase.Type type)

      Returns a copy of `this` immutable component with the specified `type`.

      Sets the type of the textbox. Acceptable values are `ITextboxBase.Type`

      Parameters:
        `type` - The type of the textbox.

        Default: `"text"`.

      Returns:
        A modified copy of the `this` object
      See Also:
        `ITextboxBase.Type`

    - #### isSubmitByEnter

          default boolean isSubmitByEnter()

      Returns whether it is submitByEnter, If submitByEnter is true, press enter will fire onOK event instead of move to next line, you should press shift + enter if you want to move to next line.

      Default: false.

    - #### withSubmitByEnter

          I withSubmitByEnter​(boolean submitByEnter)

      Returns a copy of `this` immutable component with the specified `submitByEnter`.

      Sets whether it is submitByEnter. If submitByEnter is true, press enter will fire onOK event instead of move to next line, you should press shift + enter if you want to move to next line.

      Parameters:
        `submitByEnter` - `true` to enable whether it is submitByEnter

        Default: `false`.

      Returns:
        A modified copy of the `this` object