de.hunsicker.jalopy.plugin.eclipse
Class InternalErrorDialog

java.lang.Object
  |
  +--org.eclipse.jface.window.Window
        |
        +--org.eclipse.jface.dialogs.Dialog
              |
              +--org.eclipse.jface.dialogs.IconAndMessageDialog
                    |
                    +--org.eclipse.jface.dialogs.MessageDialog
                          |
                          +--de.hunsicker.jalopy.plugin.eclipse.InternalErrorDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class InternalErrorDialog
extends org.eclipse.jface.dialogs.MessageDialog

Added a Details button to the MessageDialog to show the exception stack trace.


Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.MessageDialog
ERROR, INFORMATION, NONE, QUESTION, WARNING
 
Fields inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
imageLabel, message, messageLabel
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_INFO, DLG_IMG_MESSAGE_ERROR, DLG_IMG_MESSAGE_INFO, DLG_IMG_MESSAGE_WARNING, DLG_IMG_QUESTION, DLG_IMG_WARNING, ELLIPSIS
 
Fields inherited from class org.eclipse.jface.window.Window
CANCEL, OK
 
Constructor Summary
InternalErrorDialog(org.eclipse.swt.widgets.Shell parentShell, java.lang.String dialogTitle, org.eclipse.swt.graphics.Image dialogTitleImage, java.lang.String dialogMessage, java.lang.Throwable detail, int dialogImageType, java.lang.String[] dialogButtonLabels, int defaultIndex)
          Creates a new InternalErrorDialog object.
 
Method Summary
protected  void buttonPressed(int buttonId)
          DOCUMENT ME!
protected  void createDropDownText(org.eclipse.swt.widgets.Composite parent)
          Create this dialog's drop-down list component.
static void openError(org.eclipse.swt.widgets.Shell parent, java.lang.String title, java.lang.String message, java.lang.Throwable detail)
          Convenience method to open a standard error dialog.
static boolean openQuestion(org.eclipse.swt.widgets.Shell parent, java.lang.String title, java.lang.String message, java.lang.Throwable detail)
          Convenience method to open a simple Yes/No question dialog.
 
Methods inherited from class org.eclipse.jface.dialogs.MessageDialog
configureShell, createButton, createButtonsForButtonBar, createCustomArea, createDialogArea, customShouldTakeFocus, getButton, getButtonLabels, getDefaultButtonIndex, getImage, getMinimumMessageWidth, handleShellCloseEvent, openConfirm, openError, openInformation, openQuestion, openWarning, setButtonLabels, setButtons
 
Methods inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
createButtonBar, createContents, createDialogAndButtonArea, createMessageArea, getErrorImage, getInfoImage, getMessageLabelStyle, getQuestionImage, getWarningImage
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
 
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

InternalErrorDialog

public InternalErrorDialog(org.eclipse.swt.widgets.Shell parentShell,
                           java.lang.String dialogTitle,
                           org.eclipse.swt.graphics.Image dialogTitleImage,
                           java.lang.String dialogMessage,
                           java.lang.Throwable detail,
                           int dialogImageType,
                           java.lang.String[] dialogButtonLabels,
                           int defaultIndex)
Creates a new InternalErrorDialog object.

Parameters:
parentShell - DOCUMENT ME!
dialogTitle - DOCUMENT ME!
dialogTitleImage - DOCUMENT ME!
dialogMessage - DOCUMENT ME!
detail - DOCUMENT ME!
dialogImageType - DOCUMENT ME!
dialogButtonLabels - DOCUMENT ME!
defaultIndex - DOCUMENT ME!
Method Detail

openError

public static void openError(org.eclipse.swt.widgets.Shell parent,
                             java.lang.String title,
                             java.lang.String message,
                             java.lang.Throwable detail)
Convenience method to open a standard error dialog.

Parameters:
parent - the parent shell of the dialog, or null if none
title - the dialog's title, or null if none
message - the message
detail - the detail throwable.

openQuestion

public static boolean openQuestion(org.eclipse.swt.widgets.Shell parent,
                                   java.lang.String title,
                                   java.lang.String message,
                                   java.lang.Throwable detail)
Convenience method to open a simple Yes/No question dialog.

Parameters:
parent - the parent shell of the dialog, or null if none
title - the dialog's title, or null if none
message - the message
detail - the detail throwable.
Returns:
true if the user presses the OK button, false otherwise

buttonPressed

protected void buttonPressed(int buttonId)
DOCUMENT ME!

Overrides:
buttonPressed in class org.eclipse.jface.dialogs.MessageDialog
Parameters:
buttonId - DOCUMENT ME!

createDropDownText

protected void createDropDownText(org.eclipse.swt.widgets.Composite parent)
Create this dialog's drop-down list component.

Parameters:
parent - the parent composite


Copyright © 1997-2005 Jalopy. All Rights Reserved.