com.ibm.commons.swt.dialog
Class LWPDErrorDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.IconAndMessageDialog
              extended by org.eclipse.jface.dialogs.ErrorDialog
                  extended by com.ibm.commons.swt.dialog.LWPDErrorDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public class LWPDErrorDialog
extends org.eclipse.jface.dialogs.ErrorDialog

As the name suggests, a dialog that is used to display an error message. This dialog is normally accessed statically.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
 
Fields inherited from class org.eclipse.jface.dialogs.ErrorDialog
AUTOMATED_MODE
 
Fields inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
imageLabel, message, messageLabel
 
Fields inherited from class org.eclipse.jface.dialogs.Dialog
blockedHandler, buttonBar, DIALOG_DEFAULT_BOUNDS, DIALOG_PERSISTLOCATION, DIALOG_PERSISTSIZE, dialogArea, DLG_IMG_ERROR, DLG_IMG_HELP, 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
LWPDErrorDialog(org.eclipse.swt.widgets.Shell parentShell, java.lang.String dialogTitle, java.lang.String message, org.eclipse.core.runtime.IStatus status, int displayMask)
          Constructs a new instance of this class with the given parameters.
 
Method Summary
 boolean close()
           
protected  org.eclipse.swt.widgets.Control createMessageArea(org.eclipse.swt.widgets.Composite composite)
           
static int openError(org.eclipse.swt.widgets.Shell parent, java.lang.String dialogTitle, java.lang.String message, org.eclipse.core.runtime.IStatus status)
          Opens an instance of the error dialog.
static int openError(org.eclipse.swt.widgets.Shell parentShell, java.lang.String title, java.lang.String message, org.eclipse.core.runtime.IStatus status, int displayMask)
          Opens an instance of the error dialog.
 
Methods inherited from class org.eclipse.jface.dialogs.ErrorDialog
buttonPressed, configureShell, createButtonsForButtonBar, createDetailsButton, createDialogAndButtonArea, createDialogArea, createDropDownList, getImage, isResizable, open, setStatus, shouldDisplay, shouldShowDetailsButton, showDetailsArea
 
Methods inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
createButtonBar, createContents, getErrorImage, getInfoImage, getMessageLabelStyle, getQuestionImage, getWarningImage
 
Methods inherited from class org.eclipse.jface.dialogs.Dialog
applyDialogFont, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, 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, handleShellCloseEvent, 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

LWPDErrorDialog

public LWPDErrorDialog(org.eclipse.swt.widgets.Shell parentShell,
                       java.lang.String dialogTitle,
                       java.lang.String message,
                       org.eclipse.core.runtime.IStatus status,
                       int displayMask)
Constructs a new instance of this class with the given parameters. Note that the dialog will have no visual representation (no widgets) until it is told to open.

Normally one should use openError(Shell, String, String, IStatus) to create and open one of these. This constructor is useful only if the error object being displayed contains child items and you need to specify a mask which will be used to filter the displaying of these children. The error dialog will only be displayed if there is at least one child status matching the mask.

Parameters:
parentShell - the parent shell used to construct the dialog
dialogTitle - the message to appear in the title bar of the dialog
message - the message to appear in the body of the dialog
status - the status corresponding to the error message, will typically contain an exception
displayMask - the mask to use to filter the displaying of child items, as per IStatus.matches
See Also:
IStatus.matches(int)
Method Detail

createMessageArea

protected org.eclipse.swt.widgets.Control createMessageArea(org.eclipse.swt.widgets.Composite composite)
Overrides:
createMessageArea in class org.eclipse.jface.dialogs.IconAndMessageDialog

close

public boolean close()
Overrides:
close in class org.eclipse.jface.dialogs.ErrorDialog

openError

public static int openError(org.eclipse.swt.widgets.Shell parent,
                            java.lang.String dialogTitle,
                            java.lang.String message,
                            org.eclipse.core.runtime.IStatus status)
Opens an instance of the error dialog.

Parameters:
parent - the parent shell
dialogTitle - the text to appear in the title bar, null for the default
message - the message to display to the user
status - the exception to display to the user
Returns:
returns which button was pressed to dismiss the dialog

openError

public static int openError(org.eclipse.swt.widgets.Shell parentShell,
                            java.lang.String title,
                            java.lang.String message,
                            org.eclipse.core.runtime.IStatus status,
                            int displayMask)
Opens an instance of the error dialog.

Parameters:
parent - the parent shell
dialogTitle - the text to appear in the title bar, null for the default
message - the message to display to the user
status - the exception to display to the user
displayMask - the mask to use to filter the displaying of child items, as per IStatus.matches
Returns:
returns which button was pressed to dismiss the dialog