Package docking.wizard
Class WizardManager
- java.lang.Object
-
- docking.DialogComponentProvider
-
- docking.wizard.WizardManager
-
- All Implemented Interfaces:
ActionContextProvider,WizardPanelListener,StatusListener,TaskListener
public class WizardManager extends DialogComponentProvider implements WizardPanelListener
A dialog that controls the panels for going to "Next" and "Previous" in some process that the user is being led through.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringBACKDefault text for the 'back' buttonstatic java.lang.StringFINISHDefault text for the 'finish' buttonstatic java.lang.StringNEXTDefault text for the 'next' button-
Fields inherited from class docking.DialogComponentProvider
applyButton, cancelButton, dismissButton, okButton, rootPanel
-
-
Constructor Summary
Constructors Constructor Description WizardManager(java.lang.String title, boolean modal, PanelManager pmgr)ConstructorWizardManager(java.lang.String title, boolean modal, PanelManager pmgr, javax.swing.Icon wizardIcon)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanback()Programmatically move the wizard back one panel.protected voidcancelCallback()The callback method for when the "Cancel" button is pressed.voidcompleted(boolean success)Notification that the wizard process is complete.voiddisableNavigation()Disable the back, next, finish, and cancel buttons.voiddispose()voidenableNavigation()Enable the next, previous, and finish buttons according to the panel manager for this dialog.booleanfinish()Programmatically finished the wizard task.voidfocusFinish()Places focus on the 'finish' button.voidfocusNext()Places focus on the 'next' button.WizardPanelgetCurrentWizardPanel()Returns the current wizard panel.java.lang.StringgetStatusMessage()Returns the current status message being displayed in this dialog.booleannext()Programmatically move the wizard forward one panel.voidsetStatusMessage(java.lang.String msg)Notification to set a status message.voidshowWizard()Display this dialog.voidshowWizard(java.awt.Component parent)Display this dialog and parent it to the given component.voidvalidityChanged()Notification that something on the panel changed.-
Methods inherited from class docking.DialogComponentProvider
addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, dialogClosed, dialogShown, dismissCallback, doInitialize, escapeCallback, executeProgressTask, getActionContext, getActions, getBackground, getBounds, getComponent, getDefaultButton, getDefaultSize, getDialogSize, getFocusComponent, getGlassPane, getIntialLocation, getLocationOnScreen, getPreferredSize, getRemberSize, getRememberLocation, getStatusLabel, getStatusText, getTaskMonitorComponent, getTaskScheduler, getTitle, getUseSharedLocation, hideTaskMonitorComponent, isApplyEnabled, isCancelEnabled, isModal, isOKEnabled, isResizeable, isRunningTask, isShowing, isTransient, isVisible, main, notifyContextChanged, okCallback, removeAction, removeButton, removeWorkPanel, repack, 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 Detail
-
FINISH
public static final java.lang.String FINISH
Default text for the 'finish' button- See Also:
- Constant Field Values
-
NEXT
public static final java.lang.String NEXT
Default text for the 'next' button- See Also:
- Constant Field Values
-
BACK
public static final java.lang.String BACK
Default text for the 'back' button- See Also:
- Constant Field Values
-
-
Constructor Detail
-
WizardManager
public WizardManager(java.lang.String title, boolean modal, PanelManager pmgr)Constructor- Parameters:
title- title of the dialogmodal- true if the wizard should be modalpmgr- object that knows about the next and previous panels
-
WizardManager
public WizardManager(java.lang.String title, boolean modal, PanelManager pmgr, javax.swing.Icon wizardIcon)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 Detail
-
dispose
public void dispose()
- See Also:
Window.dispose()
-
validityChanged
public void validityChanged()
Description copied from interface:WizardPanelListenerNotification that something on the panel changed.- Specified by:
validityChangedin interfaceWizardPanelListener- See Also:
WizardPanelListener.validityChanged()
-
getStatusMessage
public java.lang.String getStatusMessage()
Returns the current status message being displayed in this dialog.- Returns:
- the current status message being displayed in this dialog
-
setStatusMessage
public void setStatusMessage(java.lang.String msg)
Description copied from interface:WizardPanelListenerNotification to set a status message.- Specified by:
setStatusMessagein interfaceWizardPanelListener- Parameters:
msg- message- See Also:
WizardPanelListener.setStatusMessage(String)
-
showWizard
public void showWizard()
Display this dialog.
-
showWizard
public void showWizard(java.awt.Component parent)
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 processmsg- message to display in the dialog's status area
-
enableNavigation
public void enableNavigation()
Enable the next, previous, and finish buttons according to the panel manager for this dialog. The panel manager is the object that knows the steps in the process and what buttons should be enabled.
-
disableNavigation
public void disableNavigation()
Disable the back, next, finish, and cancel buttons.
-
cancelCallback
protected void cancelCallback()
Description copied from class:DialogComponentProviderThe callback method for when the "Cancel" button is pressed. The default behavior is to call setVisible(false) and dispose() on the dialog.- Overrides:
cancelCallbackin 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
public WizardPanel getCurrentWizardPanel()
Returns the current wizard panel.- Returns:
- the current wizard panel
-
-