|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openoffice.ide.eclipse.core.wizards.utils.WizardPageSet
public abstract class WizardPageSet
A wizard page set is a subset of a wizard which should be reused by several wizards.
Field Summary | |
---|---|
protected boolean |
mChangingPages
|
protected IPageListener |
mPageListener
Listener to use to listen for any page change which impacts the wizard set contained pages. |
protected org.eclipse.jface.wizard.IWizard |
mWizard
Reference to the wizard containing the pages. |
Constructor Summary | |
---|---|
WizardPageSet(org.eclipse.jface.wizard.IWizard pWizard)
Constructor. |
Method Summary | |
---|---|
void |
addPage(org.eclipse.jface.wizard.IWizardPage pPage)
Add the pages into a list in order to store them. |
protected abstract void |
dataChanged(UnoFactoryData pDelta)
This method has to be called to ask the pages contained in the set to be updated with new external data. |
abstract void |
doFinish(org.eclipse.core.runtime.IProgressMonitor pMonitor,
org.eclipse.ui.IWorkbenchPage pActivePage)
Performs the actions to run at the end of the wizard for the wizard set. |
org.eclipse.jface.wizard.IWizardPage |
getNextPage(org.eclipse.jface.wizard.IWizardPage pCurrentPage)
Get the visible page to show after a page. |
org.eclipse.jface.wizard.IWizardPage |
getPage(java.lang.String pName)
Returns the page with the given name. |
org.eclipse.jface.wizard.IWizardPage[] |
getPages()
Get an array of the contained pages. |
org.eclipse.jface.wizard.IWizardPage |
getPreviousPage(org.eclipse.jface.wizard.IWizardPage pCurrentPage)
Get the visible page to show before a page. |
abstract void |
initialize(UnoFactoryData pData)
Initializes the wizard pages with default data. |
void |
setHidden(org.eclipse.jface.wizard.IWizardPage pPage,
boolean pHidden)
Set a page as hidden in the wizard. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected boolean mChangingPages
protected IPageListener mPageListener
protected org.eclipse.jface.wizard.IWizard mWizard
Constructor Detail |
---|
public WizardPageSet(org.eclipse.jface.wizard.IWizard pWizard)
pWizard
- the wizard containing the wizard set.Method Detail |
---|
public org.eclipse.jface.wizard.IWizardPage getPage(java.lang.String pName)
pName
- the name of the page to look for
null
if none has been found.public void addPage(org.eclipse.jface.wizard.IWizardPage pPage)
The order in which they had been added will be the order in which they will be show in the wizard. By default all the added pages are visible.
Note that the pages are not added into the wizard. This one has
to add all the set pages using the getNextPage(IWizardPage)
method.
pPage
- the page to add.public org.eclipse.jface.wizard.IWizardPage[] getPages()
This method doesn't care whether the pages are visible or not.
public void setHidden(org.eclipse.jface.wizard.IWizardPage pPage, boolean pHidden)
This method defines whether a page of the wizard set should be shown or not. Be aware that the page are created even if they aren't shown.
This method has no effect if the page is not contained in the wizard set. Otherwise the page will simply not be taken into consideration in the wizard.
pPage
- the page to hidepHidden
- true
to hide the page,
false
otherwisepublic org.eclipse.jface.wizard.IWizardPage getNextPage(org.eclipse.jface.wizard.IWizardPage pCurrentPage) throws NoSuchPageException
The next page is determined by the order in which it has been added in the wizard set. The first non-hidden page added after the current page will be returned.
The wizard should use this method to find the next page instead of the normal one.
Here is a sample replacement of the normal method in the wizard:
public IWizardPage getNextPage(IWizardPage page) { IWizardPage next = null; try { next = wizardSet.getNextPage(page); } catch (NoSuchPageException e) { // Return the default next page if the page is not in the wizard set. next = super.getNextPage(page); } return next; }
pCurrentPage
- the page after which is the next page
null
if the current page is the last one.
NoSuchPageException
- is thrown if the page isn't contained in the
wizard set.for more informations on hidden
pages in the wizard set.
public org.eclipse.jface.wizard.IWizardPage getPreviousPage(org.eclipse.jface.wizard.IWizardPage pCurrentPage) throws NoSuchPageException
The previous page is determined by the order in which it has been added in the wizard set. The last non-hidden page added before the current page will be returned.
The wizard should use this method to find the previous page instead of the normal one.
Here is a sample replacement of the normal method in the wizard:
public IWizardPage getPreviousPage(IWizardPage page) { IWizardPage previous = null; try { previous = wizardSet.getPreviousPage(page); } catch (NoSuchPageException e) { // Return the default previous page if the page is not in the // wizard set. previous = super.getPreviousPage(page); } return previous; }
pCurrentPage
- the page before which is the previous page
null
if the current page is the
first one.
NoSuchPageException
- is thrown if the page isn't contained in the
wizard set.for more informations on hidden
pages in the wizard set.
public abstract void initialize(UnoFactoryData pData)
This method should set all the correct data in the pages supposing nothing has already been entered.
This method should be overridden by the subclasses. The default method doesn't perform any action.
pData
- the data describing the default/initial values of the pagespublic abstract void doFinish(org.eclipse.core.runtime.IProgressMonitor pMonitor, org.eclipse.ui.IWorkbenchPage pActivePage)
Performs the changes needed by the wizard set. This method has to be
called in the IWizard.performFinish()
method. For cleaner actions
the actions performed by the wizard set finish should concern only the
data defined by the wizard set pages.
The active page is often needed by the UnoFactory
to open a
newly created file in the workbench.
This method should be overridden by the subclasses. The default method doesn't perform any action.
pMonitor
- the monitor used to follow the finish process.pActivePage
- the page that was active before opening the wizard.for more informations on actions performed
when finishing a wizard.
protected abstract void dataChanged(UnoFactoryData pDelta)
This method should be overridden by the subclasses. The default method doesn't perform any action.
pDelta
- the data delta of the changed page.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |