com.ibm.jdg2e.wizards.newwizards
Class PageChain

java.lang.Object
  extended byorg.eclipse.jface.dialogs.DialogPage
      extended byorg.eclipse.jface.wizard.WizardPage
          extended bycom.ibm.jdg2e.wizards.newwizards.PageChain
All Implemented Interfaces:
org.eclipse.jface.dialogs.IDialogPage, org.eclipse.jface.dialogs.IMessageProvider, org.eclipse.jface.wizard.IWizardPage

public class PageChain
extends org.eclipse.jface.wizard.WizardPage
implements org.eclipse.jface.wizard.IWizardPage

Customized WizardPage that both displays information about the current Wizard/WizardPage state and can provide user control of page flow through the active Wizard.

Based on how the page is instantiated/configured, it can be one of a set of defined pages for a Wizard, or be one in a chain of pages (hence the name: PageChain).

The UI, as defined in PageChain.createControl() displays:

See Also:
WizardPage, DefinedPageWizard, DynamicPageWizard

Field Summary
 
Fields inherited from interface org.eclipse.jface.dialogs.IMessageProvider
ERROR, INFORMATION, NONE, WARNING
 
Constructor Summary
PageChain(java.lang.String pageName)
          Generated constructor to set page name.
PageChain(java.lang.String pageName, java.lang.String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
          Generated constructor to set page name, title, and image.
PageChain(org.eclipse.jface.wizard.Wizard wizard, java.lang.String pageName, int pageNumber, java.lang.String title, org.eclipse.jface.resource.ImageDescriptor titleImage)
          Alternate constructor that saves a reference to the Wizard that created the page and initializes the pageNumber for this page.
 
Method Summary
 void createControl(org.eclipse.swt.widgets.Composite composite)
          Create wizard page user interface.
(package private)  void dynmaicUIControl(org.eclipse.swt.widgets.Composite parent)
          Attempts to customize UI based on previous page data.
(package private)  void fillPageSetList(org.eclipse.jface.wizard.IWizardPage[] pages)
          Finds pages known to active Wizard and stores them in pageSet, a List UI control on the wizard page.
(package private)  void fillTraversedPagesList(org.eclipse.jface.wizard.IWizardPage chain, org.eclipse.swt.widgets.List traversedPages)
          Finds pages visted by the active Wizard and stores them in traversedPages, a List UI control on the wizard page.
(package private)  org.eclipse.jface.wizard.IWizardPage getAltNextPage()
          Lazily creates and returns the alternate wizard page.
 java.lang.String getInputValue()
          Returns value of input field on UI for use in logic of the next page.
 org.eclipse.jface.wizard.IWizardPage getNextPage()
          Overridden implementation is in use when the page is dynamic.
(package private)  java.lang.String getPageSetDetails()
          Returns a String describing the current active page in the set of pages known to the Wizard.
(package private)  org.eclipse.jface.wizard.IWizardPage getStandardNextPage()
          Lazily creates and returns the standard wizard page.
 void setDynamicPage(boolean b)
          Defines the wizard page as one that can particpate in a dynamic list of wizard pages.
 void setStartIncompletePage(boolean startIncompletePage)
           
 void setVisible(boolean visible)
          Uses page entry/exit trigger to reset user interface to display the correct page state.
 
Methods inherited from class org.eclipse.jface.wizard.WizardPage
canFlipToNextPage, getContainer, getDialogSettings, getImage, getName, getPreviousPage, getShell, getWizard, isCurrentPage, isPageComplete, setDescription, setErrorMessage, setImageDescriptor, setMessage, setPageComplete, setPreviousPage, setTitle, setWizard, toString
 
Methods inherited from class org.eclipse.jface.dialogs.DialogPage
convertHeightInCharsToPixels, convertHorizontalDLUsToPixels, convertVerticalDLUsToPixels, convertWidthInCharsToPixels, dispose, getControl, getDescription, getDialogFontName, getErrorMessage, getFont, getMessage, getMessageType, getTitle, getToolTipText, initializeDialogUnits, isControlCreated, performHelp, setButtonLayoutData, setControl, setMessage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.eclipse.jface.wizard.IWizardPage
canFlipToNextPage, getName, getPreviousPage, getWizard, isPageComplete, setPreviousPage, setWizard
 
Methods inherited from interface org.eclipse.jface.dialogs.IDialogPage
dispose, getControl, getDescription, getErrorMessage, getImage, getMessage, getTitle, performHelp, setDescription, setImageDescriptor, setTitle
 

Constructor Detail

PageChain

public PageChain(java.lang.String pageName)
Generated constructor to set page name.

Parameters:
pageName -

PageChain

public PageChain(java.lang.String pageName,
                 java.lang.String title,
                 org.eclipse.jface.resource.ImageDescriptor titleImage)
Generated constructor to set page name, title, and image.

Parameters:
pageName -
title -
titleImage -

PageChain

public PageChain(org.eclipse.jface.wizard.Wizard wizard,
                 java.lang.String pageName,
                 int pageNumber,
                 java.lang.String title,
                 org.eclipse.jface.resource.ImageDescriptor titleImage)
Alternate constructor that saves a reference to the Wizard that created the page and initializes the pageNumber for this page.

Parameters:
wizard -
pageName -
pageNumber -
title -
titleImage -
Method Detail

createControl

public void createControl(org.eclipse.swt.widgets.Composite composite)
Create wizard page user interface.

Specified by:
createControl in interface org.eclipse.jface.dialogs.IDialogPage
See Also:
IDialogPage.createControl(org.eclipse.swt.widgets.Composite)

dynmaicUIControl

void dynmaicUIControl(org.eclipse.swt.widgets.Composite parent)
Attempts to customize UI based on previous page data. Not possible if pages are pre-created (createPageControls() method).

Parameters:
parent -

fillPageSetList

void fillPageSetList(org.eclipse.jface.wizard.IWizardPage[] pages)
Finds pages known to active Wizard and stores them in pageSet, a List UI control on the wizard page.

Parameters:
pages -

fillTraversedPagesList

void fillTraversedPagesList(org.eclipse.jface.wizard.IWizardPage chain,
                            org.eclipse.swt.widgets.List traversedPages)
Finds pages visted by the active Wizard and stores them in traversedPages, a List UI control on the wizard page.

Parameters:
chain -
traversedPages -

getAltNextPage

org.eclipse.jface.wizard.IWizardPage getAltNextPage()
Lazily creates and returns the alternate wizard page.

Returns:
IWizardPage - Alternate page format

getInputValue

public java.lang.String getInputValue()
Returns value of input field on UI for use in logic of the next page.

Returns:
String - Value of UI control used to gather user input on page.

getNextPage

public org.eclipse.jface.wizard.IWizardPage getNextPage()
Overridden implementation is in use when the page is dynamic.

The implementation inherited from WizardPage just returns the next page known to the Wizard. The PageChain implementation returns either a standard page or alternate page (names and title differ). Page returned depends on UI values as defined by the user (standard or alternate page).

Specified by:
getNextPage in interface org.eclipse.jface.wizard.IWizardPage
Returns:
IWizardPage - Next page to be shown by Wizard.
See Also:
setDynamicPage(boolean), IWizardPage.getNextPage()

getPageSetDetails

java.lang.String getPageSetDetails()
Returns a String describing the current active page in the set of pages known to the Wizard.

Returns:
String - Details to be shown in UI

getStandardNextPage

org.eclipse.jface.wizard.IWizardPage getStandardNextPage()
Lazily creates and returns the standard wizard page.

Returns:
IWizardPage - Standard page format

setDynamicPage

public void setDynamicPage(boolean b)
Defines the wizard page as one that can particpate in a dynamic list of wizard pages.

Parameters:
b -

setStartIncompletePage

public void setStartIncompletePage(boolean startIncompletePage)
Parameters:
startIncompletePage - The startIncompletePage to set.

setVisible

public void setVisible(boolean visible)
Uses page entry/exit trigger to reset user interface to display the correct page state. (non-Javadoc)

Specified by:
setVisible in interface org.eclipse.jface.dialogs.IDialogPage
See Also:
IDialogPage.setVisible(boolean)