Class ApplicationSupport

java.lang.Object
xal.tools.apputils.ApplicationSupport

public class ApplicationSupport extends Object
Common application utilities
  • Method Details

    • getActiveWindow

      public static Window getActiveWindow()
      Get the active window which is in focus for this application. It is typically a good window relative to which you can place application warning dialog boxes.
      Returns:
      The active window
    • displayConfirmDialog

      public static int displayConfirmDialog(String title, String message)
      Display a confirmation dialog with a title and message
      Parameters:
      title - The title of the dialog
      message - The message to display
      Returns:
      YES_OPTION or NO_OPTION
    • displayWarning

      public static void displayWarning(Exception exception)
      Display a warning dialog box with information about the exception.
      Parameters:
      exception - The exception about which the warning dialog is displayed.
    • displayWarning

      public static void displayWarning(String title, String message)
      Display a warning dialog box.
      Parameters:
      title - Title of the warning dialog box.
      message - The warning message to appear in the warning dialog box.
    • displayWarning

      public static void displayWarning(String title, String prefix, Exception exception)
      Display a warning dialog box with information about the exception.
      Parameters:
      title - Title of the warning dialog box.
      prefix - Text that should appear in the dialog box before the exception message.
      exception - The exception about which the warning dialog is displayed.
    • displayError

      public static void displayError(String title, String message)
      Display an error dialog box.
      Parameters:
      title - Title of the warning dialog box.
      message - The warning message to appear in the warning dialog box.
    • displayError

      public static void displayError(Exception exception)
      Display an error dialog box with information about the exception.
      Parameters:
      exception - The exception about which the warning dialog is displayed.
    • displayError

      public static void displayError(String title, String prefix, Exception exception)
      Display an error dialog box with information about the exception. This method allows clarification about the consequences of the exception (e.g. "Save Failed:").
      Parameters:
      title - Title of the warning dialog box.
      prefix - Text that should appear in the dialog box before the exception message.
      exception - The exception about which the warning dialog is displayed.
    • displayApplicationError

      public static void displayApplicationError(String title, String prefix, Exception exception)
      Display an error dialog box with information about the exception. This method allows clarification about the consequences of the exception (e.g. "Save Failed:").
      Parameters:
      title - Title of the warning dialog box.
      prefix - Text that should appear in the dialog box before the exception message.
      exception - The exception about which the warning dialog is displayed.