Class DialogInput.Text.Builder

java.lang.Object
fr.fidorial.dialog.DialogInput.Text.Builder
Enclosing class:
DialogInput.Text

public static final class DialogInput.Text.Builder extends Object
Fluent builder for DialogInput.Text.
Since:
0.1.0
  • Method Details

    • label

      @Contract("_ -> this") public DialogInput.Text.Builder label(ComponentLike label)
      Parameters:
      label - the label displayed to the left of the field
      Returns:
      this builder
      Since:
      0.1.0
    • width

      @Contract("_ -> this") public DialogInput.Text.Builder width(int width)
      Parameters:
      width - the width of the field
      Returns:
      this builder
      Since:
      0.1.0
    • labelVisible

      @Contract("_ -> this") public DialogInput.Text.Builder labelVisible(boolean labelVisible)
      Parameters:
      labelVisible - whether the label is drawn at all
      Returns:
      this builder
      Since:
      0.1.0
    • initial

      @Contract("_ -> this") public DialogInput.Text.Builder initial(String initial)
      Parameters:
      initial - the value the field starts with
      Returns:
      this builder
      Since:
      0.1.0
    • maxLength

      @Contract("_ -> this") public DialogInput.Text.Builder maxLength(int maxLength)
      Parameters:
      maxLength - the largest number of characters the player may type
      Returns:
      this builder
      Since:
      0.1.0
    • multiline

      @Contract("_, _ -> this") public DialogInput.Text.Builder multiline(@Nullable Integer maxLines, @Nullable Integer height)
      Turns the field into a text area.
      Parameters:
      maxLines - the largest number of lines accepted, or null for no limit
      height - the height of the area, or null for the client default
      Returns:
      this builder
      Since:
      0.1.0
    • build

      @Contract("-> new") public DialogInput.Text build()
      Returns the built input control.
      Returns:
      the built input control
      Since:
      0.1.0