Dialogs
A dialog consists of a DialogPage. You can create your own DialogPage by subclassing AbstractDialogPage, or you can use the FormBackedDialogPage, which uses a Form. You can group dialog pages on one dialog using a CompositeDialogPage, which has one implementation: TabbedDialogPage.
TODO: example of FormBackedDialogPage
TODO: example of TabbedDialogPage and TreeCompositeDialogPage + screenshots
TODO: example of AbstractDialogPage implementation
Application Dialog
Application Dialogs are simple dialogs. They can be used to show information to the user, or ask input from the user.
ConfirmationDialog
A confirmation dialog is used to ask confirmation of the user. You have to create a subclass of ConfirmationDialog and implement the onConfirm method.
ConfirmationDialog dialog = new ConfirmationDialog() {
protected void onConfirm() {
};
dialog.setTitle("Confirmation");
dialog.setConfirmationMessage("Are you sure you want to do this?");
dialog.showDialog();
TODO: insert image here
InputApplicationDialog
TODO: insert image here
Titled Application Dialog
A Titled Application Dialog has a title area at the top, that can contain a description of the dialog, or an error message.
TODO: insert image here
Wizard Framework
A Wizard maintains a list of WizardPages with a mechanism to complete them in a well-defined order, usually by clicking on a "next" button. Typical wizard features are provided, e.g. a "Finish" Button, once enough data is gathered, grayed out buttons while user input is missing, etc. The Wizard is hosted in a WizardContainer.
Wizard Page
A WizardPage (Interface) is a specialized DialogPage that is aware of being part of a Wizard. An AbstractWizardPage is provided for convenience.
Pages should be added to the Wizard by calling the addPage() method multiple times. It's standard practice to overwrite Wizard.addPages() to add all the pages. AbstractWizards also provides an addForm() method that wraps a Form into a FormBackedWizardPage.
The pages are shown in the order that they have been added.
Wizard Container
WizardContainer is an Interface that is implemented by containers that can host a Wizard. At the time of this writing, only WizardDialog was available (a modal dialog rendering the Wizard). By implementing this Interface, Wizards can be embedded anywhere.
Wizard Dialog
Resources
If the Wizard has a non-null id, resources are looked up as wizardId.pageId.objectId, otherwise as pageId.objectId.
SetupWizard
The org.springframework.richclient.application.setup package contains classes that implement a Wizard for accepting a License agreement. This is a good example for implementing a Wizard.
Dynamic Wizard Page Sequence
From the forum:
| Question |
Answer |
| Is it possible to have dynamic WizardPages in a Wizard? |
Register all possible wizard pages with your Wizard implementation and then use the page level getNextPage() and getPreviousPage() methods to customize the page ordering. |