Package docking.wizard

# Class WizardDialog

java.lang.Object
docking.DialogComponentProvider
docking.wizard.WizardDialog

All Implemented Interfaces:
  `ActionContextProvider`, `StatusListener`, `TaskListener`

public class WizardDialog extends DialogComponentProvider
A dialog for displaying a series of wizard panels used to collect data from the user before performing some task with the collected data. This dialog is generic and is used to display the wizard steps as defined by a `WizardModel`.

To use this dialog, create an instance of a `WizardModel` and construct this dialog with that model, optionally specifying if the dialog is modal or not (default is modal). Then call either the `show()` or `show(Component)` method to display it. If the model's purpose is to create some object, get it from the model when done.

For example,

                    FooWizardModel model = new FooWizardModel();
                    WizardDialog wizard = new WizardDialog(model);
                    wizard.show();
                    Foo foo = model.getFoo();

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final String`
  `BACK`
  Default text for the 'back' button
  `static final String`
  `FINISH`
  Default text for the 'finish' button
  `static final String`
  `NEXT`
  Default text for the 'next' button

  ### Fields inherited from class docking.DialogComponentProvider

  `applyButton, buttonPanel, cancelButton, dismissButton, okButton, rootPanel`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `WizardDialog(WizardModel<?> model)`
  Constructs a modal WizardDialog using the given model.
  `WizardDialog(WizardModel<?> model, boolean modal)`
  Constructs a WizardDialog using the given model.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `void`
  `cancel()`
  Cancels the wizard
  `protected void`
  `cancelCallback()`
  The callback method for when the "Cancel" button is pressed.
  `void`
  `dispose()`
  Disposes this dialog.
  `void`
  `focusFinish()`
  Places focus on the 'finish' button.
  `void`
  `focusNext()`
  Places focus on the 'next' button.
  `WizardStep<?>`
  `getCurrentStep()`
  Returns the current wizard panel.
  `String`
  `getStatusMessage()`
  Returns the current status message being displayed in this dialog.
  `void`
  `setStatusMessage(String message)`
  Sets the status message on the dialog
  `void`
  `show()`
  Shows the wizard dialog.
  `void`
  `show(Component parent)`
  Shows the wizard dialog parented to the given component.

  ### Methods inherited from class docking.DialogComponentProvider

  `addAction, addApplyButton, addButton, addCancelButton, addDismissButton, addOKButton, addWorkPanel, alertMessage, alertMessage, applyCallback, cancelCurrentTask, clearScheduledTask, clearStatusText, close, closeDialog, createSharedActions, 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, isDialogKeyBindingAction, 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`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### FINISH

    public static final String FINISH
    Default text for the 'finish' button
    See Also:
      - Constant Field Values

  - ### NEXT

    public static final String NEXT
    Default text for the 'next' button
    See Also:
      - Constant Field Values

  - ### BACK

    public static final String BACK
    Default text for the 'back' button
    See Also:
      - Constant Field Values

- ## Constructor Details

  - ### WizardDialog

    public WizardDialog(WizardModel<?> model)
    Constructs a modal WizardDialog using the given model.
    Parameters:
      `model` - the wizard model

  - ### WizardDialog

    public WizardDialog(WizardModel<?> model, boolean modal)
    Constructs a WizardDialog using the given model.
    Parameters:
      `model` - the wizard model
      `modal` - true if the wizard should be modal

- ## Method Details

  - ### getStatusMessage

    public 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(String message)
    Sets the status message on the dialog
    Parameters:
      `message` - the message to display in the dialog

  - ### focusNext

    public void focusNext()
    Places focus on the 'next' button.

  - ### focusFinish

    public void focusFinish()
    Places focus on the 'finish' button.

  - ### getCurrentStep

    public WizardStep<?> getCurrentStep()
    Returns the current wizard panel.
    Returns:
      the current wizard panel

  - ### show

    public void show()
    Shows the wizard dialog.

  - ### show

    public void show(Component parent)
    Shows the wizard dialog parented to the given component.
    Parameters:
      `parent` - the component to parent the dialog to

  - ### 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 class `DialogComponentProvider`

  - ### cancel

    public void cancel()
    Cancels the wizard

  - ### 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 class `DialogComponentProvider`