All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class tea.awt.event.ActionManager

java.lang.Object
   |
   +----tea.awt.event.ActionManager

public class ActionManager
extends Object
implements ActionListener

This is a class that listens to the actions of a huge number of components, retrieves the associated ActionListener and dispatches the action event to it. Could be useful when an ActionListener listens to a large number of ActionEvents.

Version:
1.0 beta - 31 May 1997
Author:
Leonardo Boselli

Constructor Index

 o ActionManager()

Method Index

 o actionPerformed(ActionEvent)
Implements the ActionListener interface.
 o actions()
Returns an Enumeration of the registered actionCommands.
 o addActionListener(String, ActionListener)
Adds an ActionListener associated with the specified command.
 o dropDefaultActionListener()
Drops the default ActionListener.
 o removeActionListener(String)
Removes the ActionListener associated with the specified command.
 o setDefaultActionListener(ActionListener)
Defines the default ActionListener to be called when the actionCommand is not registered.

Constructors

 o ActionManager
 public ActionManager()

Methods

 o setDefaultActionListener
 public void setDefaultActionListener(ActionListener al)
Defines the default ActionListener to be called when the actionCommand is not registered.

Parameters:
al - the ActionListener.
 o dropDefaultActionListener
 public void dropDefaultActionListener()
Drops the default ActionListener.

 o addActionListener
 public void addActionListener(String cmd,
                               ActionListener al)
Adds an ActionListener associated with the specified command.

Parameters:
cmd - the actionCommand.
al - the ActionListener.
 o removeActionListener
 public void removeActionListener(String cmd)
Removes the ActionListener associated with the specified command.

Parameters:
cmd - the actionCommand.
 o actions
 public Enumeration actions()
Returns an Enumeration of the registered actionCommands.

Returns:
the actionCommands (as an Enumeration).
 o actionPerformed
 public void actionPerformed(ActionEvent ae)
Implements the ActionListener interface. Takes the ActionEvent and dispatches it to the corresponding ActionListener.

Parameters:
ae - the ActionEvent.

All Packages  Class Hierarchy  This Package  Previous  Next  Index