|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.borland.primetime.wizard.BasicWizard
The BasicWizard is a simple implementation of the Wizard interface to help quickly make a new Wizard. Add pages (steps) to the BasicWizard by calling the addWizardPage(...) methods.
Wizard
,
WizardPage
,
BasicWizardPage
Field Summary | |
protected java.util.ArrayList |
pages
Storage for the list of WizardPage objects |
protected WizardHost |
wizardHost
Storage for the wizard host. |
protected java.lang.String |
wizardTitle
Storage for the wizard title. |
Constructor Summary | |
BasicWizard()
|
Method Summary | |
void |
addWizardPage(int index,
WizardPage page)
Adds a WizardPage to this Wizard at the specified index. |
void |
addWizardPage(WizardPage page)
Adds a WizardPage to this Wizard at the end of the list of pages. |
protected void |
checkPage(WizardPage page)
The user has clicked Next, and the Wizard should check that the page is correctly filled out. |
protected void |
finish()
The user has clicked 'Finish', and the Wizard should go do its work. |
WizardPage |
finish(WizardPage currentPage,
WizardHost host)
The user has clicked Finish, and the Wizard should go do its work. |
java.lang.String |
getWizardTitle()
Wizard interface method. |
void |
help(WizardPage currentPage,
WizardHost host)
The user has clicked the Help button while viewing the specified page. |
int |
initTotalSteps()
Returns the total number of steps for this Wizard. |
WizardPage |
invokeWizard(WizardHost host)
Returns the first page in this Wizard. |
WizardPage |
next(WizardPage currentPage,
WizardHost host)
Returns the next WizardPage - after the specified WizardPage. |
void |
removeWizardPage(int index)
Removes the WizardPage at the specified index from the Wizard. |
void |
removeWizardPage(WizardPage page)
Removes the specified WizardPage from the Wizard. |
void |
setWizardTitle(java.lang.String title)
Sets the title for this Wizard. |
void |
wizardCompleted()
The Wizard has been completed (finished or cancelled), and any resource cleanup to help the garbage collector can occur. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.lang.String wizardTitle
protected WizardHost wizardHost
protected java.util.ArrayList pages
Constructor Detail |
public BasicWizard()
Method Detail |
public void setWizardTitle(java.lang.String title)
title
- The dialog title for this Wizardpublic java.lang.String getWizardTitle()
Wizard interface method.
Returns the title for this Wizard. This is displayed as the title of the Wizard followed by the step number and total number of steps. If there is only one step in the Wizard, this title is displayed as-is with no additions.
getWizardTitle
in interface Wizard
public void addWizardPage(WizardPage page)
page
- The WizardPage to add to the Wizardpublic void addWizardPage(int index, WizardPage page)
index
- The index at which to add the WizardPage to the Wizardpage
- The WizardPage to add to the Wizardpublic void removeWizardPage(int index)
index
- The index of the WizardPage to remove from the Wizardpublic void removeWizardPage(WizardPage page)
page
- The WizardPage to remove from the Wizardpublic void help(WizardPage currentPage, WizardHost host)
The user has clicked the Help button while viewing the specified page.
help
in interface Wizard
currentPage
- The current WizardPage displaying in the Wizardhost
- The host of the Wizardpublic void wizardCompleted()
The Wizard has been completed (finished or cancelled), and any resource cleanup to help the garbage collector can occur.
wizardCompleted
in interface Wizard
protected void checkPage(WizardPage page) throws VetoException
The user has clicked Next, and the Wizard should check that the page
is correctly filled out. If the passed WizardPage is an instance of
BasicWizardPage, the default implementation will automatically call the
checkPage()
method on the BasicWizardPage.
page
- The WizardPage to checkVetoException
- Can be thrown to stop the next operation and leave
the Wizard on the current WizardPageprotected void finish() throws VetoException
The user has clicked 'Finish', and the Wizard should go do its work.
VetoException
- Can be thrown to stop the finish operation and leave
the Wizard on the current WizardPagepublic int initTotalSteps()
Returns the total number of steps for this Wizard.
initTotalSteps
in interface Wizard
public WizardPage invokeWizard(WizardHost host)
Returns the first page in this Wizard. This is the page that is displayed initially when the Wizard appears.
invokeWizard
in interface Wizard
host
- The WizardHost that will be hosting the Wizard.public WizardPage next(WizardPage currentPage, WizardHost host) throws VetoException
Returns the next WizardPage - after the specified WizardPage.
next
in interface Wizard
currentPage
- The current WizardPage displaying in the Wizardhost
- The host of the WizardVetoException
- Can be thrown to stop forward navigationpublic WizardPage finish(WizardPage currentPage, WizardHost host) throws VetoException
The user has clicked Finish, and the Wizard should go do its work. This calls the finish() method, where subclasses can put their logic.
finish
in interface Wizard
currentPage
- The current WizardPage displaying in the Wizardhost
- The host of the WizardVetoException
- Can be thrown to stop the finish operation
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |