|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.springframework.richclient.application.support.ApplicationServicesAccessor
org.springframework.richclient.wizard.AbstractWizard
public abstract class AbstractWizard
A convenience implementation of the Wizard
interface. This abstract class provides the
following basic wizard functionaliy:
cancel
and finish
.ApplicationServicesAccessor
.
Field Summary | |
---|---|
static String |
DEFAULT_IMAGE_KEY
The key that will be used to retrieve the default page image icon for the wizard. |
Fields inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
logger |
Constructor Summary | |
---|---|
AbstractWizard()
Creates a new uninitialized AbstractWizard . |
|
AbstractWizard(String wizardId)
Creates a new AbstractWizard with the given identifier. |
Method Summary | |
---|---|
WizardPage |
addForm(Form formPage)
Adds a new page to this wizard. |
protected void |
addPage(String wizardConfigurationKey,
WizardPage page)
Adds a new page to this wizard. |
void |
addPage(WizardPage page)
Adds a new page to this wizard. |
void |
addPages()
This implementation of Wizard.addPages() does nothing. |
void |
addWizardListener(WizardListener wizardListener)
Add a listener to this wizard |
boolean |
canFinish()
Returns true if all the pages of this wizard have been completed. |
protected void |
fireCancelPerformed(boolean result)
Fires an onPerformCancel event to all listeners. |
protected void |
fireFinishedPerformed(boolean result)
Fires an onPerformFinish event to all listeners. |
WizardContainer |
getContainer()
Returns the component that contains this wizard. |
Image |
getDefaultPageImage()
Returns the image stored under the key "wizard.pageIcon". |
String |
getId()
Returns this wizard's identifier. |
WizardPage |
getNextPage(WizardPage page)
Returns the successor of the given page. |
WizardPage |
getPage(String pageId)
Returns the wizard page with the given name belonging to this wizard. |
int |
getPageCount()
Returns the number of pages in this wizard. |
WizardPage[] |
getPages()
Returns all the pages in this wizard. |
WizardPage |
getPreviousPage(WizardPage page)
Returns the predecessor of the given page. |
WizardPage |
getStartingPage()
Returns the first page to be shown in this wizard. |
String |
getTitle()
Returns the window title for the container that host this wizard. |
boolean |
needsPreviousAndNextButtons()
Returns whether this wizard needs Previous and Next buttons. |
protected boolean |
onCancel()
Subclasses can override this method to perform processing when the wizard receives a cancel request. |
protected abstract boolean |
onFinish()
Subclasses must implement this method to perform any processing when the wizard receives a finish request. |
boolean |
performCancel()
Performs any required processing when the wizard is cancelled, and then fires an appropriate event to any wizard listeners listening to this wizard. |
boolean |
performFinish()
Performs any required processing when the wizard receives a finish request, and then fires an appropriate event to any wizard listeners listening to this wizard. |
void |
removePage(WizardPage page)
Removes the given page from this wizard. |
void |
removeWizardListener(WizardListener wizardListener)
Removes the given listener from this wizard. |
void |
setAutoConfigureChildPages(boolean autoConfigure)
Sets the flag that determines whether or not wizard pages will be configured as they are added to this wizard. |
void |
setContainer(WizardContainer container)
Sets the component that contains this wizard. |
void |
setForcePreviousAndNextButtons(boolean b)
Controls whether the wizard needs Previous and Next buttons even if it currently contains only one page. |
void |
setTitle(String newTitle)
Sets the window title for the container that hosts this page to the given string. |
Methods inherited from class org.springframework.richclient.application.support.ApplicationServicesAccessor |
---|
getActiveWindow, getApplication, getApplicationContext, getApplicationName, getApplicationServices, getCommandConfigurer, getComponentFactory, getConversionService, getIconSource, getImageSource, getMessage, getMessage, getMessage, getMessage, getMessages, getMessageSource, getObjectConfigurer, getService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String DEFAULT_IMAGE_KEY
Constructor Detail |
---|
public AbstractWizard()
AbstractWizard
.
public AbstractWizard(String wizardId)
AbstractWizard
with the given identifier.
wizardId
- The id used to identify this wizard.Method Detail |
---|
public String getId()
getId
in interface Wizard
public void setAutoConfigureChildPages(boolean autoConfigure)
autoConfigure
- public void setForcePreviousAndNextButtons(boolean b)
This flag should be set on wizards where the first wizard page adds follow-on wizard pages based on user input.
b
- true
to always show Next and Previous buttons,
and false
to suppress Next and Previous buttons
for single page wizardspublic String getTitle()
getTitle
in interface Wizard
public void setTitle(String newTitle)
setTitle
in interface TitleConfigurable
newTitle
- the window title for the containerpublic WizardContainer getContainer()
getContainer
in interface Wizard
public void setContainer(WizardContainer container)
setContainer
in interface Wizard
container
- the container to setpublic void addPage(WizardPage page)
page
- the new pageprotected void addPage(String wizardConfigurationKey, WizardPage page)
wizardConfigurationKey
- the parent configuration key of the page, used for
configuration, by default this wizard's id *page
- the new pagepublic WizardPage addForm(Form formPage)
FormBackedWizardPage
and appending it to the end of the page list.
formPage
- The form page to be added to the wizard.
IllegalArgumentException
- if formPage
is null.public void removePage(WizardPage page)
page
- The page to be removed.public void addPages()
Wizard.addPages()
does nothing. Subclasses should override
this method if extra pages need to be added before the wizard is displayed. New pages should
be added by calling addPage(WizardPage)
.
addPages
in interface Wizard
public boolean canFinish()
canFinish
in interface Wizard
true
if the wizard could be finished, and
false
otherwisepublic Image getDefaultPageImage()
getDefaultPageImage
in interface Wizard
ImageSource.getImage(String)
public WizardPage getNextPage(WizardPage page)
getNextPage
in interface Wizard
page
- the page
null
if nonepublic WizardPage getPage(String pageId)
getPage
in interface Wizard
pageId
- the name of the wizard page
null
if
nonepublic int getPageCount()
getPageCount
in interface Wizard
public WizardPage[] getPages()
getPages
in interface Wizard
public WizardPage getPreviousPage(WizardPage page)
getPreviousPage
in interface Wizard
page
- the page
null
if nonepublic WizardPage getStartingPage()
getStartingPage
in interface Wizard
public boolean needsPreviousAndNextButtons()
The result of this method is typically used by the container.
needsPreviousAndNextButtons
in interface Wizard
true
if Previous and Next buttons are required,
and false
if none are neededpublic void addWizardListener(WizardListener wizardListener)
addWizardListener
in interface Wizard
wizardListener
- The listener to be added.public void removeWizardListener(WizardListener wizardListener)
removeWizardListener
in interface Wizard
wizardListener
- The listener to be removed.protected void fireFinishedPerformed(boolean result)
onPerformFinish
event to all listeners.
protected void fireCancelPerformed(boolean result)
onPerformCancel
event to all listeners.
public boolean performFinish()
performFinish
in interface Wizard
true
to indicate that the finish request was accepted, false
to
indicate that it was refused.public boolean performCancel()
performCancel
in interface Wizard
true
to indicate that the cancel request was accepted, false
to
indicate that it was refused.protected abstract boolean onFinish()
true
to indicate that the finish request was accepted, false
to
indicate that it was refused.protected boolean onCancel()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |