com.ibm.commons.swt.data.dialog
Class SimpleDialog

java.lang.Object
  extended by org.eclipse.jface.window.Window
      extended by org.eclipse.jface.dialogs.Dialog
          extended by org.eclipse.jface.dialogs.TrayDialog
              extended by org.eclipse.jface.dialogs.TitleAreaDialog
                  extended by com.ibm.commons.swt.data.dialog.LWPDCommonDialog
                      extended by com.ibm.commons.swt.data.dialog.SimpleDialog
All Implemented Interfaces:
org.eclipse.jface.window.IShellProvider

public abstract class SimpleDialog
extends LWPDCommonDialog

A simple one-page dialog that can be re-used to layout simple ui.


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 com.ibm.commons.swt.data.dialog.LWPDCommonDialog
_bDialogWidgetInitialized, _bSetFocusControl, useEclipseDialog
 
Fields inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
DLG_IMG_TITLE_BANNER, DLG_IMG_TITLE_ERROR, INFO_MESSAGE, WARNING_MESSAGE
 
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
SimpleDialog(org.eclipse.swt.widgets.Shell shell)
          Constructs a new instance of this class on the given Shell.
 
Method Summary
protected  org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)
           
protected  org.eclipse.swt.widgets.Layout createContainerLayout()
          Utility method that creates a GridLayout with vertical and horizontal stacing set to SWTLayoutUtils.V_SPACING and SWTLayoutUtils.H_SPACING respectively.
protected  org.eclipse.swt.layout.GridData createControlGD()
          Creates a GridData with the widthHint set to SWTLayoutUtils.CONTROL_WHINT and the horizontalIndent set to SWTLayoutUtils.CONTROL_INDENT_AMT.
protected  org.eclipse.swt.layout.GridData createHSpanGD()
          Creates a GridData with a span set to the value of getNumberOfChildCols().
protected  org.eclipse.swt.layout.GridData createIndentGD()
          Creates a GridData with a horizontalIndent of SWTLayoutUtils.EXTRA_INDENT_AMT
protected  org.eclipse.swt.layout.GridData createListGD()
          Creates a GridData with a widthHint set to SWTLayoutUtils.CONTROL_WHINT, a horizontalIndent of zero
protected  void disableOk()
           
protected  org.eclipse.swt.graphics.Point getInitialSize()
           
protected abstract  java.lang.String getMessage()
          Return the default message.
protected  int getNumberOfChildCols()
          Returns the number of columns that will
protected  void initializeBounds()
           
protected  boolean needsProgressMonitor()
          Indicates to the dialog creation code that a progress monitor should be added to the UI and be made visible.
 
Methods inherited from class com.ibm.commons.swt.data.dialog.LWPDCommonDialog
attachProgressMonitor, close, configureShell, createContents, createDialogArea, createTitleAreaComposite, detachProgressMonitor, doPerformDialog, fillClientArea, getDialogBoundsSettings, getDialogBoundsStrategy, getDialogTitle, getTitleImage, getTitleImageDescriptor, getUpdater, getWorkbench, initMainPanel, invalidateDialog, isDirty, isModal, okPressed, open, performDialogOperation, refreshTitleArea, setBlockOnOpen, setClassDef, setDataChangeNotifier, setDataProvider, setDirty, setErrorMessage, setMessage, setUpdater, useScrollableContents, validateDialog
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
getTitleArea, getTitleImageLabel, setMessage, setTitle, setTitleAreaColor, setTitleImage
 
Methods inherited from class org.eclipse.jface.dialogs.TrayDialog
closeTray, 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, createButtonsForButtonBar, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getImage, getInitialLocation, getOKButton, initializeDialogUnits, isResizable, 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, 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

SimpleDialog

public SimpleDialog(org.eclipse.swt.widgets.Shell shell)
Constructs a new instance of this class on the given Shell.

Parameters:
shell -
Method Detail

getNumberOfChildCols

protected int getNumberOfChildCols()
Returns the number of columns that will

Returns:

getMessage

protected abstract java.lang.String getMessage()
Return the default message. Clients should subclass this instead of calling setMessage().

Returns:

initializeBounds

protected void initializeBounds()
Overrides:
initializeBounds in class org.eclipse.jface.dialogs.Dialog

createButtonBar

protected org.eclipse.swt.widgets.Control createButtonBar(org.eclipse.swt.widgets.Composite parent)
Overrides:
createButtonBar in class LWPDCommonDialog

createContainerLayout

protected org.eclipse.swt.widgets.Layout createContainerLayout()
Utility method that creates a GridLayout with vertical and horizontal stacing set to SWTLayoutUtils.V_SPACING and SWTLayoutUtils.H_SPACING respectively.

Overrides:
createContainerLayout in class LWPDCommonDialog
Returns:

createControlGD

protected org.eclipse.swt.layout.GridData createControlGD()
Creates a GridData with the widthHint set to SWTLayoutUtils.CONTROL_WHINT and the horizontalIndent set to SWTLayoutUtils.CONTROL_INDENT_AMT.

Returns:

createHSpanGD

protected org.eclipse.swt.layout.GridData createHSpanGD()
Creates a GridData with a span set to the value of getNumberOfChildCols().

Returns:

createListGD

protected org.eclipse.swt.layout.GridData createListGD()
Creates a GridData with a widthHint set to SWTLayoutUtils.CONTROL_WHINT, a horizontalIndent of zero

Returns:

createIndentGD

protected org.eclipse.swt.layout.GridData createIndentGD()
Creates a GridData with a horizontalIndent of SWTLayoutUtils.EXTRA_INDENT_AMT

Returns:

disableOk

protected void disableOk()

getInitialSize

protected org.eclipse.swt.graphics.Point getInitialSize()
Overrides:
getInitialSize in class org.eclipse.jface.dialogs.TitleAreaDialog

needsProgressMonitor

protected boolean needsProgressMonitor()
Description copied from class: LWPDCommonDialog
Indicates to the dialog creation code that a progress monitor should be added to the UI and be made visible. The progress monitor may then be used to provide feedback to the user. Clients wishing to make use of the progress monitor must override LWPDCommonDialog.needsProgressMonitor().

Overrides:
needsProgressMonitor in class LWPDCommonDialog
Returns:
true by default. Clients should override if custom behavior is desired