Class GenericWizard

All Implemented Interfaces:
ImageObserver, MenuContainer, PropertyChangeListener, Serializable, EventListener, Accessible, RootPaneContainer, WindowConstants
Direct Known Subclasses:
ReportWizard

public class GenericWizard extends JDialog implements PropertyChangeListener
See Also:
  • Field Details

    • steps

      private Vector steps
      Array of wizard steps.
    • selectedStep

      private int selectedStep
      Index of currently selected step.
    • properties

      private static HashMap properties
      Map with wizard properties.
    • btCancel

      private JButton btCancel
    • btFinish

      private JButton btFinish
    • btNext

      private JButton btNext
    • btPrevious

      private JButton btPrevious
    • lbPreview

      private JLabel lbPreview
    • lbStatus

      private JLabel lbStatus
    • pnButtons

      private JPanel pnButtons
    • pnOverview

      private JPanel pnOverview
    • pnStep

      private JPanel pnStep
    • pnSteps

      private JPanel pnSteps
    • spSeparator

      private JSeparator spSeparator
  • Constructor Details

    • GenericWizard

      public GenericWizard(String wizardTitle)
      Creates new form GenericWizard
  • Method Details

    • addWizardStep

      public void addWizardStep(WizardStep wizardStep)
      Adds new wizard step to this wizard.
      Parameters:
      wizardStep - A wizard step to be added to this wizard.
    • getFont

      public Font getFont()
      Returns font that should be used for all widgets in this component based on the language preferences specified by user.
      Specified by:
      getFont in interface MenuContainer
      Overrides:
      getFont in class Component
      Returns:
      Font to be used in this component.
    • initComponents

      private void initComponents()
      This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
    • btCancelActionPerformed

      private void btCancelActionPerformed(ActionEvent evt)
      Method called when user pushed Cancel button.
      Parameters:
      evt - Event that generated this call.
    • btFinishActionPerformed

      private void btFinishActionPerformed(ActionEvent evt)
      Method called when user pushed Finish button.
      Parameters:
      evt - Event that generated this call.
    • btNextActionPerformed

      private void btNextActionPerformed(ActionEvent evt)
      Method called when user pushed Next button.
      Parameters:
      evt - Event that generated this call.
    • btPreviousActionPerformed

      private void btPreviousActionPerformed(ActionEvent evt)
      Method called when user pushed Previous button.
      Parameters:
      evt - Event that generated this call.
    • selectStep

      private void selectStep(int index)
      Method called when new wizard step is selected.
      Parameters:
      index - Number of step to be displayed.
    • checkButtons

      public void checkButtons()
      Method called when something changed and buttons should verify their state. Most probably Next button should be enabled or disabled.
    • setPreview

      public void setPreview(ImageIcon preview)
      Sets preview of wizard result.
      Parameters:
      preview - Image to be set as preview.
    • setWizardProperty

      public static void setWizardProperty(String propertyName, Object property)
      Sets given wizard property.
      Parameters:
      propertyName - Name of property to be set.
      property - New value of given property.
    • getWizardProperty

      public static Object getWizardProperty(String propertyName)
      Returns property of wizard identified by its name.
      Parameters:
      propertyName - Name of property to be returned.
      Returns:
      Object representing value of given property.
    • propertyChange

      public void propertyChange(PropertyChangeEvent evt)
      Method called when property of some wizard step changed.
      Specified by:
      propertyChange in interface PropertyChangeListener
      Parameters:
      evt - Event that generated this call.
    • setStatus

      public void setStatus(String status)
      Sets new status text.
      Parameters:
      status - New status text.
    • goNextStep

      protected void goNextStep()
      Acts like a Next button is pressed.
    • cancelWizard

      protected void cancelWizard()
      Acts like a Cancel button is pressed.
    • finishWizard

      protected void finishWizard()
      Acts like a Finish button is pressed.