Package docking.wizard
Class WizardManager
java.lang.Object
docking.DialogComponentProvider
docking.ReusableDialogComponentProvider
docking.wizard.WizardManager
- All Implemented Interfaces:
ActionContextProvider
,WizardPanelListener
,StatusListener
,TaskListener
A dialog that controls the panels for going to "Next" and "Previous" in some
process that the user is being led through.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Default text for the 'back' buttonstatic final String
Default text for the 'finish' buttonstatic final String
Default text for the 'next' buttonFields inherited from class docking.DialogComponentProvider
applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel
-
Constructor Summary
ConstructorDescriptionWizardManager
(String title, boolean modal, PanelManager pmgr) ConstructorWizardManager
(String title, boolean modal, PanelManager pmgr, Icon wizardIcon) Constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
back()
Programmatically move the wizard back one panel.protected void
The callback method for when the "Cancel" button is pressed.void
completed
(boolean success) Notification that the wizard process is complete.void
Disable the back, next, finish, and cancel buttons.void
dispose()
Disposes this dialog.void
Enable the next, previous, and finish buttons according to the panel manager for this dialog.boolean
finish()
Programmatically finished the wizard task.void
Places focus on the 'finish' button.void
Places focus on the 'next' button.Returns the current wizard panel.Returns the current status message being displayed in this dialog.boolean
next()
Programmatically move the wizard forward one panel.void
setStatusMessage
(String msg) Notification to set a status message.void
Display this dialog.void
showWizard
(Component parent) Display this dialog and parent it to the given component.void
Notification that something on the panel changed.Methods inherited from class docking.ReusableDialogComponentProvider
close
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, closeDialog, dialogClosed, dialogShown, dismissCallback, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getHelpLocation, getId, getInitialLocation, getLocationOnScreen, getParent, getPreferredSize, getRememberLocation, getRememberSize, getStatusColor, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, notifyContextChanged, okCallback, removeAction, removeButton, removeWorkPanel, repack, setAccessibleDescription, setApplyEnabled, setApplyToolTip, setBackground, setCancelButtonText, setCancelEnabled, setCancelToolTip, setCursor, setDefaultButton, setDefaultSize, setDialogSize, setDismissToolTip, setFocusComponent, setGlassPane, setHelpLocation, setInitialLocation, setMinimumSize, setMinimumSize, setOkButtonText, setOkEnabled, setOkToolTip, setPreferredSize, setRememberLocation, setRememberSize, setResizable, setStatusJustification, setStatusText, setStatusText, setStatusText, setTitle, setTransient, setUseSharedLocation, showProgressBar, showTaskMonitorComponent, stopProgressTimer, taskCancelled, taskCompleted, toFront, toString, waitForCurrentTask
-
Field Details
-
FINISH
Default text for the 'finish' button- See Also:
-
NEXT
Default text for the 'next' button- See Also:
-
BACK
Default text for the 'back' button- See Also:
-
-
Constructor Details
-
WizardManager
Constructor- Parameters:
title
- title of the dialogmodal
- true if the wizard should be modalpmgr
- object that knows about the next and previous panels
-
WizardManager
Constructor- Parameters:
title
- title of the dialogmodal
- true if the wizard should be modalpmgr
- object that knows about the next and previous panelswizardIcon
- icon to use for this dialog
-
-
Method Details
-
dispose
public void dispose()Description copied from class:DialogComponentProvider
Disposes this dialog. Only call this when the dialog is no longer used. Calling this method will close the dialog if it is open.- Overrides:
dispose
in classReusableDialogComponentProvider
- See Also:
-
validityChanged
public void validityChanged()Description copied from interface:WizardPanelListener
Notification that something on the panel changed.- Specified by:
validityChanged
in interfaceWizardPanelListener
- See Also:
-
getStatusMessage
Returns the current status message being displayed in this dialog.- Returns:
- the current status message being displayed in this dialog
-
setStatusMessage
Description copied from interface:WizardPanelListener
Notification to set a status message.- Specified by:
setStatusMessage
in interfaceWizardPanelListener
- Parameters:
msg
- message- See Also:
-
showWizard
public void showWizard()Display this dialog. -
showWizard
Display this dialog and parent it to the given component.- Parameters:
parent
- parent
-
completed
public void completed(boolean success) Notification that the wizard process is complete.- Parameters:
success
- status of the process
-
cancelCallback
protected void cancelCallback()Description copied from class:DialogComponentProvider
The callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.- Overrides:
cancelCallback
in classDialogComponentProvider
-
back
public boolean back()Programmatically move the wizard back one panel. Simulates the user clicking on the 'back' button. Returns true if not on the first panel.- Returns:
- true if not on the first panel
-
next
public boolean next()Programmatically move the wizard forward one panel. Simulates the user clicking on the 'next' button. Returns true if not on the last panel.- Returns:
- true if not on the last panel
-
focusNext
public void focusNext()Places focus on the 'next' button. -
focusFinish
public void focusFinish()Places focus on the 'finish' button. -
finish
public boolean finish()Programmatically finished the wizard task. Returns true if the wizard can finish.- Returns:
- true if the wizard can finish
-
getCurrentWizardPanel
Returns the current wizard panel.- Returns:
- the current wizard panel
-