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

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.LWPDOnePageDialog
All Implemented Interfaces:
org.eclipse.jface.operation.IRunnableContext, org.eclipse.jface.window.IShellProvider, org.eclipse.jface.wizard.IWizardContainer

public class LWPDOnePageDialog
extends LWPDCommonDialog
implements org.eclipse.jface.wizard.IWizardContainer

A wizard container that only supports one wizard page. This 'wizard' dialog does not support a previous and next button.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.jface.window.Window
org.eclipse.jface.window.Window.IExceptionHandler
 
Field Summary
static int EXPORT_WIZARD
           
static int IMPORT_WIZARD
           
static int NEW_WIZARD
           
 
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
LWPDOnePageDialog(org.eclipse.jface.dialogs.IDialogPage dialogPage, org.eclipse.swt.widgets.Shell parentShell)
          Constructs a new instance of the class given the IDialogPage, and a shell which serves as a parent.
LWPDOnePageDialog(java.lang.String wizardId, org.eclipse.jface.viewers.IStructuredSelection selection, org.eclipse.swt.widgets.Shell parentShell)
          Constructs a new instance of the class given the wizard id, the current selection, and a shell which serves as a parent.
LWPDOnePageDialog(java.lang.String wizardId, org.eclipse.jface.viewers.IStructuredSelection selection, org.eclipse.swt.widgets.Shell parentShell, int wizardType)
          Constructs a new instance of the class given the wizard id, the current selection, a shell which serves as a parent, and a wizard type.
 
Method Summary
protected  void configureShell(org.eclipse.swt.widgets.Shell newShell)
          Configures the Shell in which the dialog will reside.
protected  void fillClientArea(org.eclipse.swt.widgets.Composite parent)
          Consummers implement this function to provide their content
 org.eclipse.jface.wizard.IWizardPage getCurrentPage()
           
protected  java.lang.String getDialogTitle()
          Returns the title of the dialog.
protected  org.eclipse.swt.graphics.Image getTitleImage()
          Returns an image to be displayed in the title area of the dialog.
 org.eclipse.ui.IWorkbenchWizard getWizard()
          Returns the workbench wizard that is being used in conjunction with the dialog.
protected  boolean performDialogOperation(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
          An abstract method that gets called when the OK button is pressed on the dialog.
 void run(boolean fork, boolean cancelable, org.eclipse.jface.operation.IRunnableWithProgress runnable)
           
 void showPage(org.eclipse.jface.wizard.IWizardPage page)
           
 void updateButtons()
           
 void updateMessage()
           
 void updateTitleBar()
           
 void updateWindowTitle()
           
protected  void validateDialog()
          Provide dialog validation for the contents of the dialog.
 
Methods inherited from class com.ibm.commons.swt.data.dialog.LWPDCommonDialog
attachProgressMonitor, close, createButtonBar, createContainerLayout, createContents, createDialogArea, createTitleAreaComposite, detachProgressMonitor, doPerformDialog, getDialogBoundsSettings, getDialogBoundsStrategy, getTitleImageDescriptor, getUpdater, getWorkbench, initMainPanel, invalidateDialog, isDirty, isModal, needsProgressMonitor, okPressed, open, refreshTitleArea, setBlockOnOpen, setClassDef, setDataChangeNotifier, setDataProvider, setDirty, setErrorMessage, setMessage, setUpdater, useScrollableContents
 
Methods inherited from class org.eclipse.jface.dialogs.TitleAreaDialog
getInitialSize, 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, initializeBounds, 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
 
Methods inherited from interface org.eclipse.jface.wizard.IWizardContainer
getShell
 

Field Detail

NEW_WIZARD

public static int NEW_WIZARD

IMPORT_WIZARD

public static int IMPORT_WIZARD

EXPORT_WIZARD

public static int EXPORT_WIZARD
Constructor Detail

LWPDOnePageDialog

public LWPDOnePageDialog(java.lang.String wizardId,
                         org.eclipse.jface.viewers.IStructuredSelection selection,
                         org.eclipse.swt.widgets.Shell parentShell)
Constructs a new instance of the class given the wizard id, the current selection, and a shell which serves as a parent.

Parameters:
wizardId - the qualified wizard id
selection - current workbench selection
shell - a parent shell

LWPDOnePageDialog

public LWPDOnePageDialog(java.lang.String wizardId,
                         org.eclipse.jface.viewers.IStructuredSelection selection,
                         org.eclipse.swt.widgets.Shell parentShell,
                         int wizardType)
Constructs a new instance of the class given the wizard id, the current selection, a shell which serves as a parent, and a wizard type.

Parameters:
wizardId - the qualified wizard id
selection - current workbench selection
shell - a parent shell
wizardType - an int which is one of
  • com.ibm.commons.swt.data.dialog.LWPDOnePageDialog.NEW_WIZARD
  • com.ibm.commons.swt.data.dialog.LWPDOnePageDialog.IMPORT_WIZARD
  • com.ibm.commons.swt.data.dialog.LWPDOnePageDialog.EXPORT_WIZARD

LWPDOnePageDialog

public LWPDOnePageDialog(org.eclipse.jface.dialogs.IDialogPage dialogPage,
                         org.eclipse.swt.widgets.Shell parentShell)
Constructs a new instance of the class given the IDialogPage, and a shell which serves as a parent.

Parameters:
dialogPage - a dialog page upon which to form the wizard page
shell - a parent shell
Method Detail

fillClientArea

protected void fillClientArea(org.eclipse.swt.widgets.Composite parent)
Description copied from class: LWPDCommonDialog
Consummers implement this function to provide their content

Specified by:
fillClientArea in class LWPDCommonDialog
Parameters:
parent - the parent composite

getTitleImage

protected org.eclipse.swt.graphics.Image getTitleImage()
Description copied from class: LWPDCommonDialog
Returns an image to be displayed in the title area of the dialog.

Overrides:
getTitleImage in class LWPDCommonDialog
Returns:

getDialogTitle

protected java.lang.String getDialogTitle()
Description copied from class: LWPDCommonDialog
Returns the title of the dialog. Subclasses should override this method.

Overrides:
getDialogTitle in class LWPDCommonDialog
Returns:
the title of the dialog

validateDialog

protected void validateDialog()
Description copied from class: LWPDCommonDialog
Provide dialog validation for the contents of the dialog. Subclasses can override, but should call super when there is no error. If an error is found LWPDCommonDialog.invalidateDialog(String) should be called.

Overrides:
validateDialog in class LWPDCommonDialog

performDialogOperation

protected boolean performDialogOperation(org.eclipse.core.runtime.IProgressMonitor progressMonitor)
Description copied from class: LWPDCommonDialog
An abstract method that gets called when the OK button is pressed on the dialog. If the client wishes to provide progress feedback to the user the supplied progress monitor may be used.
LWPDCommonDialog.needsProgressMonitor() must return true in order for the progress monitor is visible.

Specified by:
performDialogOperation in class LWPDCommonDialog
Parameters:
progressMonitor - the progress monitor that is to be used to provide progress feedback to the user
Returns:
true if operation succeeds and the dialog is to be dismissed. Returning false will cause the dialog to remain open.

getCurrentPage

public org.eclipse.jface.wizard.IWizardPage getCurrentPage()
Specified by:
getCurrentPage in interface org.eclipse.jface.wizard.IWizardContainer

showPage

public void showPage(org.eclipse.jface.wizard.IWizardPage page)
Specified by:
showPage in interface org.eclipse.jface.wizard.IWizardContainer

updateButtons

public void updateButtons()
Specified by:
updateButtons in interface org.eclipse.jface.wizard.IWizardContainer

updateMessage

public void updateMessage()
Specified by:
updateMessage in interface org.eclipse.jface.wizard.IWizardContainer

updateTitleBar

public void updateTitleBar()
Specified by:
updateTitleBar in interface org.eclipse.jface.wizard.IWizardContainer

updateWindowTitle

public void updateWindowTitle()
Specified by:
updateWindowTitle in interface org.eclipse.jface.wizard.IWizardContainer

run

public void run(boolean fork,
                boolean cancelable,
                org.eclipse.jface.operation.IRunnableWithProgress runnable)
         throws java.lang.reflect.InvocationTargetException,
                java.lang.InterruptedException
Specified by:
run in interface org.eclipse.jface.operation.IRunnableContext
Throws:
java.lang.reflect.InvocationTargetException
java.lang.InterruptedException

getWizard

public org.eclipse.ui.IWorkbenchWizard getWizard()
Returns the workbench wizard that is being used in conjunction with the dialog.

Returns:

configureShell

protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
Description copied from class: LWPDCommonDialog
Configures the Shell in which the dialog will reside. It is in this method that attributes such as the shell image is set.

Overrides:
configureShell in class LWPDCommonDialog