public class WizardController
This class is responsible for reacting to events generated by pushing any
of the three buttons, 'Next', 'Previous', and 'Cancel.' Based on what
button is pressed, the controller will update the model to show a new panel
and reset the state of the buttons as necessary.
This constructor accepts a reference to the Wizard component that created
it, which it uses to update the button components and access the
w - A callback to the Wizard component that created this controller.
public void actionPerformed(java.awt.event.ActionEvent evt)
Calling method for the action listener interface. This class listens for
actions performed by the buttons in the Wizard class, and calls methods
below to determine the correct course of action.
actionPerformed in interface java.awt.event.ActionListener
evt - The ActionEvent that occurred.
Resets the buttons to support the original panel rules, including
whether the next or back buttons are enabled or disabled, or if
the panel is finish-able. If the panel in question has another panel
behind it, enables the back button. Otherwise, disables it. If the
panel in question has one or more panels in front of it, enables the
next button. Otherwise, disables it.