Interface UITextBox

All Superinterfaces:
UIAtomicWidget, UIWidget

public interface UITextBox extends UIAtomicWidget
One-line or multi-line text box.

JavaScript type

The JavaScript type for this widget is String. If the box is empty, the value will be an empty String, that is, "".

If an afterValueChanged action has been set on this widget, the JavaScript type of the value will be the same.

Since:
5.3.0
See Also:
  • Method Details

    • getHeight

      Size getHeight()
      Returns:
      the height of the text box, or null if it has not been defined.
      Since:
      5.5.1
      See Also:
    • getWidth

      Size getWidth()
      Returns:
      the width of the text box, or null if it has not been defined.
      See Also:
    • isMultiLine

      boolean isMultiLine()
      Returns:
      true if the multi-line has been enabled, false otherwise.
      Since:
      5.5.1
      See Also:
    • setHeight

      void setHeight(Size height)
      Sets the height of the text box.

      The height feature only works when multi-line is enabled.

      If the height is null, it will use the standard height of text areas defined in the Administration section, topic Ergonomics and layout.

      Default value is null.

      Parameters:
      height - the height to set the text box to, or null to reset to default.
      Since:
      5.5.1
      See Also:
    • setMultiLine

      void setMultiLine(boolean isMultiLine)
      Enables the multi-line feature of the text box.

      When the multi-line is enabled, the height feature is available.

      Default value is false.

      Parameters:
      isMultiLine - true to enable the multi-line feature, or false to reset to default.
      Since:
      5.5.1
      See Also:
    • setWidth

      void setWidth(Size width)
      Sets the width of the text box.

      If the width is null, it will use the standard width of inputs defined in the Administration section, topic Ergonomics and layout.

      Default value is null.

      Parameters:
      width - the width to set the text box to, or null to reset to default.
    • getBackgroundColor

      String getBackgroundColor()
      Returns the previously set background color.
      Since:
      5.8.0
    • setBackgroundColor

      void setBackgroundColor(String anHtmlBackgroundColor)
      Sets the background color of the component input.

      Color must be a valid hexadecimal HTML color, and respect one of the following formats: "ABC", "#ABC", "ABCDEF" or "#ABCDEF".

      Since:
      5.8.0
    • getForegroundColor

      String getForegroundColor()
      Returns the previously set foreground color.
      Since:
      5.8.1
    • setForegroundColor

      void setForegroundColor(String anHtmlForegroundColor)
      Sets the foreground color of the component input.

      Color must be a valid hexadecimal HTML color, and respect one of the following formats: "ABC", "#ABC", "ABCDEF" or "#ABCDEF".

      Since:
      5.8.1