public abstract class IconAndMessageDialog extends Dialog
Note: Clients are expected to call createMessageArea(Composite)
,
otherwise neither the icon nor the message will appear.
Window.IExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected Label |
imageLabel
Return the label for the image.
|
protected String |
message
Message (a localized string).
|
protected Label |
messageLabel
Message label is the label the message is shown on.
|
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
CANCEL, OK, resizeHasOccurred
Constructor and Description |
---|
IconAndMessageDialog(Shell parentShell)
Constructor for IconAndMessageDialog.
|
Modifier and Type | Method and Description |
---|---|
protected Control |
createButtonBar(Composite parent)
Creates and returns the contents of this dialog's button bar.
|
protected Control |
createContents(Composite parent)
The
Dialog implementation of this Window
method 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 void |
createDialogAndButtonArea(Composite parent)
Create the dialog area and the button bar for the receiver.
|
protected Control |
createMessageArea(Composite composite)
Create the area the message will be shown in.
|
Image |
getErrorImage()
Return the
Image to be used when displaying an error. |
protected abstract Image |
getImage()
Returns the image to display beside the message in this dialog.
|
Image |
getInfoImage()
Return the
Image to be used when displaying information. |
protected int |
getMessageLabelStyle()
Returns the style for the message label.
|
Image |
getQuestionImage()
Return the
Image to be used when displaying a question. |
Image |
getWarningImage()
Return the
Image to be used when displaying a warning. |
applyDialogFont, 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, shortenText
canHandleShellCloseEvent, 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
protected String message
protected Label messageLabel
protected Label imageLabel
public IconAndMessageDialog(Shell parentShell)
parentShell
- the parent shell, or null
to create a top-level
shellprotected Control createMessageArea(Composite composite)
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.
composite
- The composite to parent from.protected int getMessageLabelStyle()
protected Control createButtonBar(Composite parent)
Dialog
The Dialog
implementation of this framework method lays
out a button bar and calls the createButtonsForButtonBar
framework method to populate it. Subclasses may override.
The returned control's layout data must be an instance of
GridData
.
createButtonBar
in class Dialog
parent
- the parent composite to contain the button barprotected abstract Image getImage()
Subclasses may override.
protected Control createContents(Composite parent)
Dialog
Dialog
implementation of this Window
method 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 the createDialogArea
and
createButtonBar
methods to create the dialog area and
button bar, respectively. Overriding createDialogArea
and
createButtonBar
are recommended rather than overriding
this method.createContents
in class Dialog
parent
- the parent composite for the controls in this window. The type
of layout used is determined by getLayout()protected void createDialogAndButtonArea(Composite parent)
parent
- public Image getErrorImage()
Image
to be used when displaying an error.public Image getWarningImage()
Image
to be used when displaying a warning.public Image getInfoImage()
Image
to be used when displaying information.public Image getQuestionImage()
Image
to be used when displaying a question.
Copyright (c) 2000, 2014 Eclipse Contributors and others. All rights reserved.Guidelines for using Eclipse APIs.