Jitsi: the OpenSource Java VoIP and Instant Messaging client.

net.java.sip.communicator.impl.gui.customcontrols.wizard
Class WizardController

java.lang.Object
  extended by net.java.sip.communicator.impl.gui.customcontrols.wizard.WizardController
All Implemented Interfaces:
ActionListener, EventListener

public class WizardController
extends Object
implements ActionListener

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.

Author:
Yana Stamcheva

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(ActionEvent evt)
          Calling method for the action listener interface.
(package private)  void resetButtonsToPanelRules()
          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.
 
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(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 ActionListener
Parameters:
evt - The ActionEvent that occurred.

resetButtonsToPanelRules

void resetButtonsToPanelRules()
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.


Jitsi: the OpenSource Java VoIP and Instant Messaging client.

Jitsi, the OpenSource Java VoIP and Instant Messaging client.
Distributable under LGPL license.