Class Dialog

java.lang.Object
cl.obcom.desktopfx.jfx.Dialog

public final class Dialog extends Object
Implements the Desktop Message Dialog.
  • Method Details

    • showInput

      public static String showInput(Object owner, String message)
      Displays an input dialog using owner and message.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      Returns:
      the user's input or null if the user canceled the input.
    • showInput

      public static String showInput(Object owner, String message, String title)
      Displays an input dialog using owner, message and title.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      title - the title of the dialog (can be null).
      Returns:
      the user's input or null if the user canceled the input.
    • showInput

      public static String showInput(Object owner, String message, String title, String initial)
      Displays an input dialog using owner, message and title.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      title - the title of the dialog (can be null).
      initial - the initial value of the input (can be null).
      Returns:
      the user's input or null if the user canceled the input.
    • showMessage

      public static void showMessage(Object owner, String message)
      Displays an information message dialog using owner and message.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
    • showMessage

      public static void showMessage(Object owner, String message, String title)
      Displays an information message dialog using owner, message and title.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      title - the title of the dialog (can be null).
    • showMessage

      public static void showMessage(Object owner, String message, String title, DialogType type)
      Displays an message dialog using owner, message, title and type.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      title - the title of the dialog (can be null).
      type - the type of the dialog (can be null).
    • showConfirm

      public static DialogAction showConfirm(Object owner, String message)
      Displays a confirmation dialog using owner and message.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      Returns:
      the selected dialog action button.
    • showConfirm

      public static DialogAction showConfirm(Object owner, String message, String title)
      Displays a confirmation dialog using owner, message and title.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      title - the title of the dialog (can be null).
      Returns:
      the selected dialog action button.
    • showConfirm

      public static DialogAction showConfirm(Object owner, String message, String title, DialogOption option)
      Displays a confirmation dialog using owner, message, title and option.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      title - the title of the dialog (can be null).
      option - the option of the dialog (can be null).
      Returns:
      the selected dialog action button.
    • showError

      public static void showError(Object owner, Throwable thrown)
      Displays an error message dialog using owner and throwable.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      thrown - the error throwable (can be null).
    • showError

      public static void showError(Object owner, String message, Throwable thrown)
      Displays an error message dialog using owner, message and throwable.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      thrown - the error throwable (can be null).
    • showError

      public static void showError(Object owner, String message, String title, Throwable thrown)
      Displays an error message dialog using owner, message, title and throwable.
      Parameters:
      owner - determines the owner of the dialog (can be null).
      message - the message of the dialog (can be null).
      title - the title of the dialog (can be null).
      thrown - the error throwable (can be null).