Klasse PromptBuilder


public class PromptBuilder extends DialogBuilder<TextInputDialog,PromptBuilder,String>
Builder for Alert Dialogs.

Provides a fluent interface to create Alerts.

  • Methodendetails

    • defaultValue

      public PromptBuilder defaultValue(String fmt, Object... args)
      Sets the default value for the prompt dialog.
      Parameter:
      fmt - the format string or the default value if no arguments are provided
      args - optional arguments for formatting the default value string
      Gibt zurück:
      the current instance of PromptBuilder for method chaining
    • validate

      public PromptBuilder validate(Predicate<? super String> validate)
      Sets the validation logic for the input prompt.
      Parameter:
      validate - a Predicate to validate the input string
      Gibt zurück:
      the current instance of PromptBuilder for method chaining
    • build

      public TextInputDialog build()
      Beschreibung aus Klasse kopiert: DialogBuilder
      Create Dialog instance.
      Setzt außer Kraft:
      build in Klasse DialogBuilder<TextInputDialog,PromptBuilder,String>
      Gibt zurück:
      Dialog instance