Interface ITextboxBase<I extends ITextboxBase>

All Superinterfaces:
IChildrenOfInputgroup<I>, IComponent<I>, IHtmlBasedComponent<I>, IInputElement<I,String>, IReadonly<I>, IXulElement<I>
All Known Subinterfaces:
IBandbox, ICombobox, ITextbox

public interface ITextboxBase<I extends ITextboxBase> extends IInputElement<I,String>
Immutable Textbox base component.
Author:
jumperchen
  • Method Details

    • withValue

      I withValue(@Nullable 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,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 String getType()
      Returns the type.

      Default: "text".

    • withType

      I withType(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:
    • 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