|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectWizard
net.refractions.udig.catalog.ui.IDataWizard
public abstract class IDataWizard
A wizard which is used to import data into udig.
This is wizard is made up of primary pages, and secondary pages. A primary page is an
that the wizard declares it will contain. A secondary
page is a page which is dynamically contributed to the wizard via a primary page, or another
secondary page.
Sublcasses declare the ordered set of primary pages with the getPrimaryPages() method.
Secondary pages are contributed dynamically by returning them from a call to
,
Secondary page processing will continue, until a page returns null from getNextPage().
Processing then continues at the next primary page. If no more primary pages exist, the
wizard finishes.
If using an IDataWizard outside of the workbench wizard framework, it is up to client code
to call
,
immediatly after instantiating the wizard.
The following are requirements on the pages of the wizard.
- They must extend from
,
- getNextPage must either return a new wizard page, or super.getNextPage()
- init(WizardPage) must be called before returning a page from
Example:
public IWizardPage getNextPage() {
if (returnNewPage) {
WizardPage newPage = new WizardPage(....);
IDataWizard wizard = (IDataWizard)getWizard();
wizard.init(page);
return page;
}
return super.getNextPage();
}
It is important to note that pages inside this wizard must return a page or
super.getNextPage() from getNextPage().
This wizard creates dialog settings for pages upon creation.
Constructor Summary | |
---|---|
IDataWizard()
|
Method Summary | |
---|---|
void |
addPages()
Adds the primary pages to the wizard. |
boolean |
canFinish()
|
IWizardPage |
getNextPage(IWizardPage page)
Returns the next primary page in the page sequence. |
protected abstract WizardPage[] |
getPrimaryPages()
Returns the set of primary pages. |
IStructuredSelection |
getSelection()
|
IWorkbench |
getWorkbench()
|
boolean |
hasMorePrimaryPages()
Determines if the wizard has any more primary pages. |
void |
init(IWorkbench workbench,
IStructuredSelection selection)
|
void |
init(WizardPage page)
Initializes a wizard page for use in the data wizard. |
boolean |
needsPreviousAndNextButtons()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public IDataWizard()
Method Detail |
---|
public void init(IWorkbench workbench, IStructuredSelection selection)
IWorkbenchWizard#init(org.eclipse.ui.IWorkbench,
org.eclipse.jface.viewers.IStructuredSelection)
public IStructuredSelection getSelection()
public IWorkbench getWorkbench()
public void addPages()
org.eclipse.jface.wizard.IWizard#addPages()
public IWizardPage getNextPage(IWizardPage page)
when a page does not contribute a secondary
page.
,
org.eclipse.jface.wizard.IWizard#getNextPage(org.eclipse.jface.wizard.IWizardPage)
public boolean hasMorePrimaryPages()
public boolean needsPreviousAndNextButtons()
org.eclipse.jface.wizard.IWizard#needsPreviousAndNextButtons()
public boolean canFinish()
public void init(WizardPage page)
page
- The page to be initialized.protected abstract WizardPage[] getPrimaryPages()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |