Package org.eclipse.jface.dialogs
Class IconAndMessageDialog
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.IconAndMessageDialog
- All Implemented Interfaces:
- IShellProvider
- Direct Known Subclasses:
- ErrorDialog,- MessageDialog,- PlainMessageDialog,- ProgressMonitorDialog
The IconAndMessageDialog is the abstract superclass of dialogs that have an
 icon and a message as the first two widgets. In this dialog the icon and
 message are direct children of the shell in order that they can be read by
 accessibility tools more easily.
 
 Note: Clients are expected to call createMessageArea(Composite),
 otherwise neither the icon nor the message will appear.
 
- 
Nested Class SummaryNested classes/interfaces inherited from class org.eclipse.jface.window.WindowWindow.IExceptionHandler
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected LabelReturn the label for the image.protected StringMessage (a localized string).protected LabelMessage label is the label the message is shown on.Fields inherited from class org.eclipse.jface.dialogs.DialogblockedHandler, 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, ELLIPSISFields inherited from class org.eclipse.jface.window.WindowCANCEL, OK, resizeHasOccurred
- 
Constructor SummaryConstructorsConstructorDescriptionIconAndMessageDialog(Shell parentShell) Constructor for IconAndMessageDialog.
- 
Method SummaryModifier and TypeMethodDescriptionprotected ControlcreateButtonBar(Composite parent) Creates and returns the contents of this dialog's button bar.protected ControlcreateContents(Composite parent) TheDialogimplementation of thisWindowmethod creates and lays out the top level composite for the dialog, and determines the appropriate horizontal and vertical dialog units based on the font size.protected voidcreateDialogAndButtonArea(Composite parent) Create the dialog area and the button bar for the receiver.protected ControlcreateMessageArea(Composite composite) Create the area the message will be shown in.protected intGet the number of columns in the layout of the Shell of the dialog.Return theImageto be used when displaying an error.protected abstract ImagegetImage()Returns the image to display beside the message in this dialog.Return theImageto be used when displaying information.protected intReturns the style for the message label.Return theImageto be used when displaying a question.Return theImageto be used when displaying a warning.Methods inherited from class org.eclipse.jface.dialogs.DialogapplyDialogFont, buttonPressed, cancelPressed, close, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, createButtonsForButtonBar, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenTextMethods inherited from class org.eclipse.jface.window.WindowcanHandleShellCloseEvent, configureShell, constrainShellSize, createShell, getConstrainedShellBounds, getContents, getDefaultImage, getDefaultImages, getDefaultOrientation, getLayout, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, open, setBlockOnOpen, setDefaultImage, setDefaultImages, setDefaultModalParent, setDefaultOrientation, setExceptionHandler, setParentShell, setReturnCode, setShellStyle, setWindowManager
- 
Field Details- 
messageMessage (a localized string).
- 
messageLabelMessage label is the label the message is shown on.
- 
imageLabelReturn the label for the image.
 
- 
- 
Constructor Details- 
IconAndMessageDialogConstructor for IconAndMessageDialog.- Parameters:
- parentShell- the parent shell, or- nullto create a top-level shell
 
 
- 
- 
Method Details- 
createMessageAreaCreate the area the message will be shown in.The parent composite is assumed to use GridLayout as its layout manager, since the parent is typically the composite created in Dialog.createDialogArea(org.eclipse.swt.widgets.Composite).Note: Clients are expected to call this method, otherwise neither the icon nor the message will appear. - Parameters:
- composite- The composite to parent from.
- Returns:
- Control
 
- 
getMessageLabelStyleprotected int getMessageLabelStyle()Returns the style for the message label.- Returns:
- the style for the message label
- Since:
- 3.0
 
- 
createButtonBarDescription copied from class:DialogCreates and returns the contents of this dialog's button bar.The Dialogimplementation of this framework method lays out a button bar and calls thecreateButtonsForButtonBarframework method to populate it. Subclasses may override.The returned control's layout data must be an instance of GridData.- Overrides:
- createButtonBarin class- Dialog
- Parameters:
- parent- the parent composite to contain the button bar
- Returns:
- the button bar control
 
- 
getImageReturns the image to display beside the message in this dialog.Subclasses may override. - Returns:
- the image to display beside the message
- Since:
- 2.0
 
- 
createContentsDescription copied from class:DialogTheDialogimplementation of thisWindowmethod creates and lays out the top level composite for the dialog, and determines the appropriate horizontal and vertical dialog units based on the font size. It then calls thecreateDialogAreaandcreateButtonBarmethods to create the dialog area and button bar, respectively. OverridingcreateDialogAreaandcreateButtonBarare recommended rather than overriding this method.- Overrides:
- createContentsin class- Dialog
- Parameters:
- parent- the parent composite for the controls in this window. The type of layout used is determined by getLayout()
- Returns:
- the control that will be returned by subsequent calls to getContents()
 
- 
getColumnCountprotected int getColumnCount()Get the number of columns in the layout of the Shell of the dialog.- Returns:
- int
- Since:
- 3.22
 
- 
createDialogAndButtonAreaCreate the dialog area and the button bar for the receiver.- Parameters:
- parent- the parent composite
 
- 
getErrorImageReturn theImageto be used when displaying an error.- Returns:
- image the error image
 
- 
getWarningImageReturn theImageto be used when displaying a warning.- Returns:
- image the warning image
 
- 
getInfoImageReturn theImageto be used when displaying information.- Returns:
- image the information image
 
- 
getQuestionImageReturn theImageto be used when displaying a question.- Returns:
- image the question image
 
 
-