|
|
|
|
RSE Wizards API
Typically in eclipse GUI design we use a wizard to create new things, and a dialog
to prompt for secondary information, or update existing things. The Remote System Explorer
can offer help in creating wizards, just as it does in creating dialogs.
RSE-Supplied Base Classes for Wizards
The RSE offers the following classes, in package
org.eclipse.rse.ui.wizards
to simplify the creation of wizards.
The AbstractSystemWizardPage class
The
AbstractSystemWizardPage
abstract base class extends the
JFace WizardPage class to offer the following benefits to subclasses:
- Designed to work in conjunction with
AbstractSystemWizard
,
propogating settings from the wizard to the individual wizard pages.
- Supports using the overall wizard page title as set
by
setWizardPageTitle(String)
in
AbstractSystemWizard
,
if no title specified in the constructor.
- Supports a
setHelp(String)
method to set the wizard page's overall contextual help
- Implements
ISystemMessageLine
so supports setting error messages as
either strings or, preferably,
SystemMessage
objects.
- Supports automatic assignment of unique mnemonics for all input-capable controls on the page, to aid in accessibility.
- Supports setting a default-focus control, which gets initial focus when the page is shown.
- Supports helper methods to aid in population of the client area:
addSeparatorLine(Composite,int)
,
addFillerLine(Composite,int)
and
addGrowableFillerLine(Composite,int)
.
The AbstractSystemWizard class
The
AbstractSystemWizard
abstract base class extends the JFace Wizard
class to offer the following benefits to subclasses:
- Designed to work in conjunction with the
SystemBaseWizardAction
,
and
SystemWizardDialog
classes, propogating settings
from these to the wizard, and further propogating those to the individual wizard pages.
- The overall wizard title and image can be set via the constructor or setter methods.
- Supports setting an input object, and getting an output object. This is exploited by the
SystemBaseWizardAction
class, when this wizard is launched from a subclass of that action class.
- Supports setting a wizard page title via
setWizardPageTitle(String)
, that all
AbstractSystemWizardPage
pages will use by default for
their title, if the non-title constructor is used for that page.
- If being hosted by a
SystemWizardDialog
, supports dynamically
updating the wizard size via
updateSize()
,
if dynamic content is added to a wizard page, causing the page to grow beyond its initial size.
- Supports a
setHelp(String)
method to set the overall wizard's contextual help. This is propogated to each
AbstractSystemWizardPage
as it is added.
- Supports setting the viewer that launched this wizard, as wizards often need to know this so they can update the UI upon Finish.
- Supports a
wasCancelled()
method so callers can easily test if the wizard was cancelled by the user.
- Supports a
setMinimumPageSize(int,int)
method to set the minimum width and height of the wizard.
- Supports a
setPageError(IWizardPage)
method that can be called in performFinish when an error is detected on a
non-current page. This issues a message telling the user there is an error on another page.
|
|
|