Class ExceptionDialog

    • Constructor Detail

      • ExceptionDialog

        public ExceptionDialog()
        Creates a new ExceptionDialog.
      • ExceptionDialog

        public ExceptionDialog​(Frame parent)
      • ExceptionDialog

        public ExceptionDialog​(Dialog parent)
    • Method Detail

      • adjustSize

        public void adjustSize()
        Adjusts the size of the dialog to fit the with of the contained message and stacktrace.
      • setScrollerVisible

        protected void setScrollerVisible​(boolean b)
        Defines, whether the scroll pane of the exception stack trace area is visible.
        Parameters:
        b - true, if the scroller should be visible, false otherwise.
      • isScrollerVisible

        protected boolean isScrollerVisible()
        Checks whether the scroll pane of the exception stack trace area is visible.
        Returns:
        true, if the scroller is visible, false otherwise.
      • setMessage

        public void setMessage​(String mesg)
        Sets the message for this exception dialog. The message is displayed on the main page.
        Parameters:
        mesg - the message.
      • getMessage

        public String getMessage()
        Returns the message for this exception dialog. The message is displayed on the main page.
        Returns:
        the message.
      • setException

        public void setException​(Exception e)
        Sets the exception for this dialog. If no exception is set, the "Detail" button is disabled and the stacktrace text cleared. Else the stacktraces text is read into the detail message area.
        Parameters:
        e - the exception.
      • getException

        public Exception getException()
        Returns the exception that was the reason for this dialog to show up.
        Returns:
        the exception.
      • showExceptionDialog

        public static void showExceptionDialog​(Component parent,
                                               String title,
                                               String message,
                                               Exception e)
        Shows an default dialog with the given message and title and the exceptions stacktrace in the detail area.
        Parameters:
        parent - the parent component.
        title - the title.
        message - the message.
        e - the exception.