Interface InputDialogBuilder<T>

All Superinterfaces:
DialogBuilder<InputDialogBuilder<T>>

public interface InputDialogBuilder<T> extends DialogBuilder<InputDialogBuilder<T>>
Displays the component from a given component value in a dialog and returns the value if the user accepts the input.
  • Method Details

    • caption

      InputDialogBuilder<T> caption(String caption)
      Parameters:
      caption - the label caption
      Returns:
      this builder instance
    • inputValid

      InputDialogBuilder<T> inputValid(StateObserver inputValid)
      A StateObserver indicating whether the input is valid, this state controls the enabled state of the OK button. Overrides inputValidator(Predicate).
      Parameters:
      inputValid - a StateObserver indicating whether the input value is valid
      Returns:
      this builder instance
    • inputValidator

      InputDialogBuilder<T> inputValidator(Predicate<T> validInputPredicate)
      Sets the inputValid(StateObserver) according to the given predicate.
      Parameters:
      validInputPredicate - the valid input predicate
      Returns:
      this builder instance
    • show

      T show()
      Shows the input dialog and returns the value if the user presses OK
      Returns:
      the value from the component value if the user accepts the input
      Throws:
      CancelException - in case the user cancels