Humboldt Alignment Editor 2.5.0

eu.esdihumboldt.hale.ui.util.dialog
Class MultiPageDialog<T extends org.eclipse.jface.dialogs.IDialogPage>

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 eu.esdihumboldt.hale.ui.util.dialog.MultiPageDialog<T>
Type Parameters:
T - the dialog page type
All Implemented Interfaces:
org.eclipse.jface.dialogs.IPageChangeProvider, org.eclipse.jface.window.IShellProvider
Direct Known Subclasses:
FeatureStyleDialog

public abstract class MultiPageDialog<T extends org.eclipse.jface.dialogs.IDialogPage>
extends org.eclipse.jface.dialogs.TrayDialog
implements org.eclipse.jface.dialogs.IPageChangeProvider

Dialog consisting of multiple IDialogPages

Author:
Simon Templer
Partner:
01 / Fraunhofer Institute for Computer Graphics Research

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 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
MultiPageDialog()
          Creates a new dialog using the current shell
MultiPageDialog(org.eclipse.swt.widgets.Shell shell)
          Creates a new dialog using the given shell
 
Method Summary
 void addPage(T page)
          Adds a dialog page
 void addPageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener listener)
           
protected abstract  boolean allowPageChange(T oldPage, T newPage)
          Called before the page changes
protected  void configureShell(org.eclipse.swt.widgets.Shell newShell)
           
protected  org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
           
protected abstract  void createPages()
          Create the dialog pages and add them using the addPage(IDialogPage) method
protected  void firePageChange(T oldPage, T newPage)
          Fire a page change
 T getCurrentPage()
          Get the current page
 org.eclipse.swt.graphics.Image getImage()
           
protected  org.eclipse.swt.graphics.Point getInitialSize()
           
 Object getSelectedPage()
           
 String getTitle()
           
protected abstract  void onPageChange(T oldPage, T newPage)
          Called after the page has changed
 void removePageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener listener)
           
 void setImage(org.eclipse.swt.graphics.Image image)
           
 void setTitle(String title)
           
 
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, createButtonsForButtonBar, createDialogArea, dialogFontIsDefault, getBlockedHandler, getButton, getButtonBar, getCancelButton, getDialogArea, getDialogBoundsSettings, getDialogBoundsStrategy, getImage, getInitialLocation, getOKButton, initializeBounds, initializeDialogUnits, isResizable, 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
 

Constructor Detail

MultiPageDialog

public MultiPageDialog()
Creates a new dialog using the current shell


MultiPageDialog

public MultiPageDialog(org.eclipse.swt.widgets.Shell shell)
Creates a new dialog using the given shell

Parameters:
shell - the shell
Method Detail

configureShell

protected void configureShell(org.eclipse.swt.widgets.Shell newShell)
Overrides:
configureShell in class org.eclipse.jface.window.Window
See Also:
Window.configureShell(Shell)

createContents

protected org.eclipse.swt.widgets.Control createContents(org.eclipse.swt.widgets.Composite parent)
Overrides:
createContents in class org.eclipse.jface.dialogs.Dialog
See Also:
Dialog.createContents(Composite)

getInitialSize

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

createPages

protected abstract void createPages()
Create the dialog pages and add them using the addPage(IDialogPage) method


addPage

public void addPage(T page)
Adds a dialog page

Parameters:
page - the dialog page to add

addPageChangedListener

public void addPageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener listener)
Specified by:
addPageChangedListener in interface org.eclipse.jface.dialogs.IPageChangeProvider
See Also:
IPageChangeProvider.addPageChangedListener(IPageChangedListener)

getSelectedPage

public Object getSelectedPage()
Specified by:
getSelectedPage in interface org.eclipse.jface.dialogs.IPageChangeProvider
See Also:
IPageChangeProvider.getSelectedPage()

getCurrentPage

public T getCurrentPage()
Get the current page

Returns:
the current page

removePageChangedListener

public void removePageChangedListener(org.eclipse.jface.dialogs.IPageChangedListener listener)
Specified by:
removePageChangedListener in interface org.eclipse.jface.dialogs.IPageChangeProvider
See Also:
IPageChangeProvider.removePageChangedListener(IPageChangedListener)

firePageChange

protected void firePageChange(T oldPage,
                              T newPage)
Fire a page change

Parameters:
oldPage - the old page
newPage - the new page

onPageChange

protected abstract void onPageChange(T oldPage,
                                     T newPage)
Called after the page has changed

Parameters:
oldPage - the old page
newPage - the new page

allowPageChange

protected abstract boolean allowPageChange(T oldPage,
                                           T newPage)
Called before the page changes

Parameters:
oldPage - the old page
newPage - the new page
Returns:
if the page change is allowed

getTitle

public String getTitle()
Returns:
the title

setTitle

public void setTitle(String title)
Parameters:
title - the title to set

getImage

public org.eclipse.swt.graphics.Image getImage()
Returns:
the image

setImage

public void setImage(org.eclipse.swt.graphics.Image image)
Parameters:
image - the image to set

Humboldt Alignment Editor 2.5.0

Build 2012-12-03_12-30-59
Revision 9d2dd4b0318cda9f1393b1ddd390f7f792d70a2d