sk.uniba.euromath.editor.dialogs
Class WidgetWrapperDialog<W extends IUserInputWidget>
java.lang.Object
org.eclipse.jface.window.Window
org.eclipse.jface.dialogs.Dialog
org.eclipse.jface.dialogs.TrayDialog
org.eclipse.jface.dialogs.TitleAreaDialog
sk.uniba.euromath.editor.dialogs.WidgetWrapperDialog<W>
- Type Parameters:
W
- dialog shows this kind of widget.
- All Implemented Interfaces:
- IShellProvider
public final class WidgetWrapperDialog<W extends IUserInputWidget>
- extends TitleAreaDialog
Wraps a widget in a dialog.
- Author:
- Martin Vysny
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 |
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog |
close, closeTray, createButtonBar, createHelpControl, getLayout, getTray, isDialogHelpAvailable, isHelpAvailable, openTray, setDialogHelpAvailable, setHelpAvailable |
Methods inherited from class org.eclipse.jface.dialogs.Dialog |
applyDialogFont, buttonPressed, cancelPressed, convertHeightInCharsToPixels, convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, convertWidthInCharsToPixels, create, createButton, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, 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, getParentShell, getReturnCode, getShell, getShellListener, getShellStyle, getWindowManager, handleFontChange, handleShellCloseEvent, 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 |
errorMessage
protected String errorMessage
- We need to remember currently shown error message.
message
protected String message
- Warning or info message.
messageType
protected int messageType
- Type of currently shown message.
WidgetWrapperDialog
public WidgetWrapperDialog(Shell parent,
String caption,
String description,
IWidgetFactory<W> factory)
- Constructor.
- Parameters:
parent
- parent shell. Should not be null
.caption
- caption of the dialog.factory
- the factory producing a widget. Only one widget is
required to be produced for one dialog.description
- Description, what this dialog intends to do.
createDialogArea
protected Control createDialogArea(Composite parent)
- Overrides:
createDialogArea
in class TitleAreaDialog
getWidget
public W getWidget()
- Returns the widget.
- Returns:
- the widget, or
null
if dialog is not yet created.
configureShell
protected void configureShell(Shell newShell)
- Overrides:
configureShell
in class Window
setMessages
protected void setMessages(ValidityMessages messages)
- Updates messages on this page.
- Parameters:
messages
- validity messages. If null
then all messages
are cleared.
getMessageType
public int getMessageType()
- Returns type of message currently being shown.
- Returns:
- type of message currently being shown.
setErrorMessage
public void setErrorMessage(String errorMsg)
- Overrides:
setErrorMessage
in class TitleAreaDialog
setMessage
public void setMessage(String msg,
int type)
- Overrides:
setMessage
in class TitleAreaDialog
createButtonsForButtonBar
protected void createButtonsForButtonBar(Composite parent)
- Overrides:
createButtonsForButtonBar
in class Dialog
Copyright © 2003-2006 null. All Rights Reserved.