org.springframework.richclient.wizard
Class WizardDialog

Show UML class diagram
java.lang.Object
  extended by org.springframework.richclient.application.support.ApplicationServicesAccessor
      extended by org.springframework.richclient.dialog.ApplicationDialog
          extended by org.springframework.richclient.dialog.TitledApplicationDialog
              extended by org.springframework.richclient.wizard.WizardDialog
All Implemented Interfaces:
PropertyChangeListener, EventListener, PropertyChangePublisher, DescriptionConfigurable, Guarded, TitleConfigurable, Messagable, ImageConfigurable, WizardContainer
Direct Known Subclasses:
BasicWizardDialog, ExtendedWizardDialog, SetupWizardDialog

public class WizardDialog
extends TitledApplicationDialog
implements WizardContainer, PropertyChangeListener

Dialog for wizards.

Author:
Keith Donald

Field Summary
protected  ActionCommand backCommand
           
protected  WizardPage currentPage
           
protected  int largestPageHeight
           
protected  int largestPageWidth
           
protected  ActionCommand nextCommand
           
protected  Wizard wizard
           
 
Fields inherited from class org.springframework.richclient.dialog.ApplicationDialog
DEFAULT_CANCEL_COMMAND_ID, DEFAULT_FINISH_COMMAND_ID, DEFAULT_FINISH_SUCCESS_MESSAGE_KEY, DEFAULT_FINISH_SUCCESS_TITLE_KEY, logger, SUCCESS_FINISH_MESSAGE_KEY, SUCCESS_FINISH_TITLE_KEY
 
Fields inherited from interface org.springframework.richclient.dialog.Messagable
MESSAGE_PROPERTY
 
Constructor Summary
WizardDialog()
           
WizardDialog(Wizard wizard)
           
 
Method Summary
protected  JComponent createTitledDialogContentPane()
           
protected  Object[] getCommandGroupMembers()
          Template getter method to return the commands to populate the dialog button bar.
 WizardPage getCurrentPage()
          Returns the current wizard page for this container.
protected  String getFinishCommandId()
          Subclasses may override to return a custom message key, default is "okCommand", corresponding to the "&OK" label.
protected  void onAboutToShow()
          Template lifecycle method invoked right before the dialog is to become visible.
protected  void onBack()
           
protected  void onCancel()
          Handle a dialog cancellation request.
protected  boolean onFinish()
          Request invocation of the action taken when the user hits the OK (finish) button.
protected  void onNext()
           
 void propertyChange(PropertyChangeEvent e)
           
 void setWizard(Wizard wizard)
           
 void showPage(WizardPage page)
          Makes the given page visible.
protected  void updateDialog()
          Updates this dialog's controls to reflect the current page.
protected  void updateMessagePane()
          Updates the message (or error message) shown in the message line to reflect the state of the currently active page in this container.
protected  void updateTitlePane()
          Updates the title bar (title, description, and image) to reflect the state of the currently active page in this container.
 
Methods inherited from class org.springframework.richclient.dialog.TitledApplicationDialog
addDialogComponents, addPropertyChangeListener, addPropertyChangeListener, createDialogContentPane, disposeDialogContentPane, getDescription, getMessage, getTitlePaneImage, getTitlePaneTitle, isMessageShowing, removePropertyChangeListener, removePropertyChangeListener, setCaption, setContentPane, setDescription, setImage, setMessage, setTitlePaneImage, setTitlePaneTitle
 
Methods inherited from class org.springframework.richclient.dialog.ApplicationDialog
addActionKeyBinding, addActionKeyBinding, attachListeners, componentsChanged, createButtonBar, createDialog, dispose, getActionMap, getCallingCommand, getCancelCommand, getCancelCommandId, getDialog, getDialogContentPane, getDisplayFinishSuccessMessage, getFinishCommand, getFinishSecurityControllerId, getFinishSuccessMessage, getFinishSuccessMessageArguments, getFinishSuccessTitle, getFinishSuccessTitleArguments, getInputMap, getLocation, getLocationRelativeTo, getParentComponent, getParentWindow, getPreferredSize, getTitle, getWindowForComponent, hide, init, isControlCreated, isEnabled, isShowing, onInitialized, onWindowActivated, onWindowClosing, onWindowGainedFocus, onWindowLostFocus, registerCancelCommandAsDefault, registerDefaultCommand, registerDefaultCommand, setCallingCommand, setCloseAction, setDefaultEnabled, setDisplayFinishSuccessMessage, setEnabled, setFinishEnabled, setLocation, setLocationRelativeTo, setModal, setParentComponent, setPreferredSize, setResizable, setTitle, showDialog, showFinishSuccessMessageDialog
 
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

wizard

protected Wizard wizard

nextCommand

protected ActionCommand nextCommand

backCommand

protected ActionCommand backCommand

currentPage

protected WizardPage currentPage

largestPageWidth

protected int largestPageWidth

largestPageHeight

protected int largestPageHeight
Constructor Detail

WizardDialog

public WizardDialog()

WizardDialog

public WizardDialog(Wizard wizard)
Method Detail

setWizard

public void setWizard(Wizard wizard)

getFinishCommandId

protected String getFinishCommandId()
Description copied from class: ApplicationDialog
Subclasses may override to return a custom message key, default is "okCommand", corresponding to the "&OK" label.

Overrides:
getFinishCommandId in class ApplicationDialog
Returns:
The message key to use for the finish ("ok") button

createTitledDialogContentPane

protected JComponent createTitledDialogContentPane()
Specified by:
createTitledDialogContentPane in class TitledApplicationDialog
Returns:
a component that will be added as the content of the Titled Dialog.

getCommandGroupMembers

protected Object[] getCommandGroupMembers()
Description copied from class: ApplicationDialog
Template getter method to return the commands to populate the dialog button bar.

Overrides:
getCommandGroupMembers in class ApplicationDialog
Returns:
The array of commands (may also be a separator or glue identifier)

onAboutToShow

protected void onAboutToShow()
Description copied from class: ApplicationDialog
Template lifecycle method invoked right before the dialog is to become visible.

Overrides:
onAboutToShow in class ApplicationDialog

showPage

public void showPage(WizardPage page)
Description copied from interface: WizardContainer
Makes the given page visible.

This method should not be use for normal page sequencing (back, next) which is handled by the container itself. It may, however, be used to move to another page in response to some custom action such as double clicking in a list.

Specified by:
showPage in interface WizardContainer
Parameters:
page - the page to show
See Also:
WizardContainer.getCurrentPage()

getCurrentPage

public WizardPage getCurrentPage()
Description copied from interface: WizardContainer
Returns the current wizard page for this container.

Specified by:
getCurrentPage in interface WizardContainer
Returns:
the current wizard page, or null if the container is not yet showing the wizard
See Also:
WizardContainer.showPage(org.springframework.richclient.wizard.WizardPage)

onBack

protected void onBack()

onNext

protected void onNext()

onFinish

protected boolean onFinish()
Description copied from class: ApplicationDialog
Request invocation of the action taken when the user hits the OK (finish) button.

Specified by:
onFinish in class ApplicationDialog
Returns:
true if action completed successfully; false otherwise.

onCancel

protected void onCancel()
Description copied from class: ApplicationDialog
Handle a dialog cancellation request.

Overrides:
onCancel in class ApplicationDialog

updateDialog

protected void updateDialog()
Updates this dialog's controls to reflect the current page.


updateTitlePane

protected void updateTitlePane()
Updates the title bar (title, description, and image) to reflect the state of the currently active page in this container.


updateMessagePane

protected void updateMessagePane()
Updates the message (or error message) shown in the message line to reflect the state of the currently active page in this container.


propertyChange

public void propertyChange(PropertyChangeEvent e)
Specified by:
propertyChange in interface PropertyChangeListener


Copyright © 2004-2009 The Spring Framework. All Rights Reserved.