GUI
Class MenuWorker

java.lang.Object
  extended by GUI.MenuWorker
All Implemented Interfaces:
java.awt.event.ActionListener, java.util.EventListener

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

Class rensponsible for managing the menus of the program.


Constructor Summary
MenuWorker(GUI gui)
          Constructor of a new MenuWorker object.
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
          Method implementing actionPerformed method in the actionListener interface.
 void disableMenu()
          Method rensponsible for disabling the menu of the program.
 void enableMenu()
          Method rensponsible for enabling the menu of the program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MenuWorker

public MenuWorker(GUI gui)
Constructor of a new MenuWorker object. A MenuWorker object is rensponcible for managing all the menus of the program. Thus, in this constructor, the menus are creating and keyboard shortcuts and actionListeners are attached to them.

Parameters:
gui - The GUI object to which the menus will be added.
Method Detail

disableMenu

public void disableMenu()
Method rensponsible for disabling the menu of the program. The menu must be disabled in some cases, in order to avoid program mulfunctions.


enableMenu

public void enableMenu()
Method rensponsible for enabling the menu of the program.


actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Method implementing actionPerformed method in the actionListener interface. In this method there is all the necessary code for managing ActionEvent events.

Specified by:
actionPerformed in interface java.awt.event.ActionListener
Parameters:
e - the ActionEvent which has occured.