Class PWizard

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PWizard extends JPanel
The PWizard framework design lets you add PWizardPanel objects in order and then manage the sequence more explicitly. It is basically a JPanel which acts as a container - to the bottom, a navigator with the usual wizard buttons, and to the top, a panel that switches between various components
See Also:
  • Field Details

  • Constructor Details

    • PWizard

      public PWizard()
      Constructs a PWizard panel and adds a DeckPanel and a PWizardNavigator
    • PWizard

      public PWizard(boolean helpBtnRightAligned)
      Constructs a PWizard panel for right align help button and adds a DeckPanel and a PWizardNavigator
  • Method Details

    • setManager

      public void setManager(SequenceManager mgr)
      Sets the manager that manages the sequence of the components added to the wizard
      Parameters:
      mgr - The SequenceManager
    • getManager

      public SequenceManager getManager()
      Gets the manager that manages the sequence of the components added to the wizard
      Returns:
      The SequenceManager that has been set for the wizard
    • addPanel

      public void addPanel(String name, Component panel)
      Adds the given component to the wizard. Components are ordered in the sequence in which they are added
      Parameters:
      name - The name by which the component is identified
      panel - The component to be added
    • setFirst

      public void setFirst()
      Makes the component that was added first to the wizard, active
    • isCancelled

      public boolean isCancelled()
      Call this to determine if the wizard was cancelled
      Returns:
      true if the wizard was cancelled
    • setButtonListener

      public void setButtonListener(int buttonType, ActionListener al)
      Sets the specified ActionListener for the given button type.
      Parameters:
      buttonType - - an integer specifying the button type.

      Valid values are:

    • BACK_BUTTON
    • NEXT_BUTTON
    • HELP_BUTTON
    • CANCEL_BUTTON
    • al - the ActionListener which will be added to the specified button.
    • getHelpButton

      public JButton getHelpButton()
      Returns the wizard's help button. Users of this class will need to provide their own help support. (A recommended way of providing help for modal dialog boxes using JavaHelp makes use of the help button.)
      Returns:
      help button
      See Also:
      • invalid reference
        javax.help.HelpBroker#enableHelpOnButton(java.awt.Component, java.lang.String, javax.help.HelpSet)