Package org.pentaho.di.ui.core.dialog
Class SimpleMessageDialog
- java.lang.Object
-
- org.eclipse.jface.window.Window
-
- org.eclipse.jface.dialogs.Dialog
-
- org.eclipse.jface.dialogs.IconAndMessageDialog
-
- org.eclipse.jface.dialogs.MessageDialog
-
- org.pentaho.di.ui.core.dialog.SimpleMessageDialog
-
- All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider
public class SimpleMessageDialog extends org.eclipse.jface.dialogs.MessageDialogA simple message dialog containing a title, icon, message and a single button (OK by default) that closes the dialog. The dialog width can be specified and the height is auto-adjusted based on the width.
-
-
Field Summary
Fields Modifier and Type Field Description static intBUTTON_WIDTHstatic intDEFULT_WIDTHprotected static Class<?>PKG-
Fields inherited from class org.eclipse.jface.dialogs.MessageDialog
CONFIRM, ERROR, INFORMATION, NONE, QUESTION, QUESTION_WITH_CANCEL, 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_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
-
-
Constructor Summary
Constructors Constructor Description SimpleMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String title, String message, int dialogType)Creates a new dialog with the button label set to "Ok", dialog width set toDEFULT_WIDTHand button width set toBUTTON_WIDTHSimpleMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String title, String message, int dialogType, String buttonLabel)Creates a new dialog with the button label set tocloseButtonLabel, dialog width set toDEFULT_WIDTHand button width set toBUTTON_WIDTHSimpleMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String title, String message, int dialogType, String buttonLabel, int width, int buttonWidth)Creates a new dialog with the specified title, message, dialogType and width.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigureShell(org.eclipse.swt.widgets.Shell shell)Overridden to make the shell background white.protected voidconstrainShellSize()Overridden to auto-size the shell according to the selected width.voidcreate()Overridden to give the button the desired width.-
Methods inherited from class org.eclipse.jface.dialogs.MessageDialog
buttonPressed, createButton, createButtonsForButtonBar, createCustomArea, createDialogArea, customShouldTakeFocus, getButton, getButtonLabels, getDefaultButtonIndex, getImage, getMinimumMessageWidth, handleShellCloseEvent, open, open, openConfirm, openError, openInformation, openQuestion, openWarning, setButtonLabels, setButtons
-
Methods inherited from class org.eclipse.jface.dialogs.IconAndMessageDialog
createButtonBar, createContents, createDialogAndButtonArea, createMessageArea, getColumnCount, 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, dialogFontIsDefault, getBlockedHandler, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getInitialSize, getOKButton, initializeBounds, initializeDialogUnits, isResizable, okPressed, setBlockedHandler, setButtonLayoutData, setButtonLayoutFormData, shortenText
-
Methods inherited from class org.eclipse.jface.window.Window
canHandleShellCloseEvent, 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
-
-
-
-
Field Detail
-
PKG
protected static Class<?> PKG
-
BUTTON_WIDTH
public static final int BUTTON_WIDTH
- See Also:
- Constant Field Values
-
DEFULT_WIDTH
public static final int DEFULT_WIDTH
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
SimpleMessageDialog
public SimpleMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String title, String message, int dialogType)Creates a new dialog with the button label set to "Ok", dialog width set toDEFULT_WIDTHand button width set toBUTTON_WIDTH- Parameters:
parentShell- the parentShelltitle- the dialog titlemessage- the dialog messagedialogType- the dialog type (MessageDialog.INFORMATION,MessageDialog.WARNING,MessageDialog.ERRORetc...)
-
SimpleMessageDialog
public SimpleMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String title, String message, int dialogType, String buttonLabel)Creates a new dialog with the button label set tocloseButtonLabel, dialog width set toDEFULT_WIDTHand button width set toBUTTON_WIDTH- Parameters:
parentShell- the parentShelltitle- the dialog titlemessage- the dialog messagedialogType- the dialog type (MessageDialog.INFORMATION,MessageDialog.WARNING,MessageDialog.ERRORetc...)buttonLabel- the label for the close dialog
-
SimpleMessageDialog
public SimpleMessageDialog(org.eclipse.swt.widgets.Shell parentShell, String title, String message, int dialogType, String buttonLabel, int width, int buttonWidth)Creates a new dialog with the specified title, message, dialogType and width.- Parameters:
parentShell- the parentShelltitle- the dialog titlemessage- the dialog messagedialogType- the dialog type (MessageDialog.INFORMATION,MessageDialog.WARNING,MessageDialog.ERRORetc...)buttonLabel- the button labelwidth- dialog widthbuttonWidth- button width
-
-
Method Detail
-
constrainShellSize
protected void constrainShellSize()
Overridden to auto-size the shell according to the selected width.- Overrides:
constrainShellSizein classorg.eclipse.jface.window.Window
-
configureShell
protected void configureShell(org.eclipse.swt.widgets.Shell shell)
Overridden to make the shell background white.- Overrides:
configureShellin classorg.eclipse.jface.dialogs.MessageDialog- Parameters:
shell-
-
create
public void create()
Overridden to give the button the desired width.- Overrides:
createin classorg.eclipse.jface.dialogs.Dialog
-
-