Class TextInput

java.lang.Object
com.ultikits.ultitools.ui.TextInput
All Implemented Interfaces:
FormInput<String>

public final class TextInput extends Object implements FormInput<String>
Free text. Value: the entered string (possibly empty).
  • Field Details

    • MAX_LENGTH

      public static final int MAX_LENGTH
      Maximum supported text length.
      See Also:
    • key

      private final String key
    • label

      private final Text label
    • initial

      private final String initial
    • maxLength

      private final int maxLength
    • maxLines

      private final int maxLines
  • Constructor Details

  • Method Details

    • builder

      public static TextInput.Builder builder(String key, Text label)
      Starts an input with an empty initial string, maximum length 32 and one line.
    • key

      public String key()
      Description copied from interface: FormInput
      Unique within its form; [a-z0-9_]+, at most 32 characters.
      Specified by:
      key in interface FormInput<String>
    • label

      public Text label()
      Description copied from interface: FormInput
      The deferred label.
      Specified by:
      label in interface FormInput<String>
    • initial

      public String initial()
      The initial text.
    • maxLength

      public int maxLength()
      Maximum length, 1..256; default 32.
    • maxLines

      public int maxLines()
      1 for single-line; more for a multi-line box.
    • equals

      public boolean equals(@Nullable @Nullable Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object