Class WizardManager

All Implemented Interfaces:
ActionContextProvider, WizardPanelListener, StatusListener, TaskListener

public class WizardManager extends ReusableDialogComponentProvider 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 Details

  • Constructor Details

    • WizardManager

      public WizardManager(String title, boolean modal, PanelManager pmgr)
      Constructor
      Parameters:
      title - title of the dialog
      modal - true if the wizard should be modal
      pmgr - object that knows about the next and previous panels
    • WizardManager

      public WizardManager(String title, boolean modal, PanelManager pmgr, Icon wizardIcon)
      Constructor
      Parameters:
      title - title of the dialog
      modal - true if the wizard should be modal
      pmgr - object that knows about the next and previous panels
      wizardIcon - 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 class ReusableDialogComponentProvider
      See Also:
    • validityChanged

      public void validityChanged()
      Description copied from interface: WizardPanelListener
      Notification that something on the panel changed.
      Specified by:
      validityChanged in interface WizardPanelListener
      See Also:
    • 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 msg)
      Description copied from interface: WizardPanelListener
      Notification to set a status message.
      Specified by:
      setStatusMessage in interface WizardPanelListener
      Parameters:
      msg - message
      See Also:
    • showWizard

      public void showWizard()
      Display this dialog.
    • showWizard

      public void showWizard(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 process
    • 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: 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
    • 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