net.sf.fmj.ui.wizard
Class WizardController

java.lang.Object
  extended by net.sf.fmj.ui.wizard.WizardController
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

public class WizardController
extends java.lang.Object
implements java.awt.event.ActionListener

Adapted Robert Eckstein's sample at http://java.sun.com/developer/technicalArticles/GUI/swing/wizard/ 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.


Constructor Summary
WizardController(Wizard w)
          This constructor accepts a reference to the Wizard component that created it, which it uses to update the button components and access the WizardModel.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
          Calling method for the action listener interface.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WizardController

public WizardController(Wizard w)
This constructor accepts a reference to the Wizard component that created it, which it uses to update the button components and access the WizardModel.

Parameters:
w - A callback to the Wizard component that created this controller.
Method Detail

actionPerformed

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.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
evt - The ActionEvent that occurred.