adavid.awt
Class ActionManager

java.lang.Object
  |
  +--adavid.awt.ActionManager

public class ActionManager
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.ItemListener

ActionManager contains an ActionListener which redirects the calls to specialized functions of the form public void/whatever something(ActionEvent e) only one redirection per component!


Field Summary
static java.lang.Class ACTIONEVENT
          the Class object to create the methods
static java.lang.Class[] ARG_ACTIONEVENT
           
static java.lang.Class[] ARG_ITEMEVENT
           
static java.lang.Class ITEMEVENT
          the Class object to create the methods
static ActionManager listener
          this garantees that there is only one instance
 
Constructor Summary
ActionManager()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          implements ActionListener redirection
static void add(java.lang.Object compo, java.lang.String func, java.lang.Object handler)
          add an action listener
static void addItem(java.lang.Object compo, java.lang.String func, java.lang.Object handler)
          add an item listener
 void itemStateChanged(java.awt.event.ItemEvent event)
          implements ItemListener redirection
static void remove(java.awt.Component compo)
          remove the listened object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

listener

public static final ActionManager listener
this garantees that there is only one instance

ACTIONEVENT

public static final java.lang.Class ACTIONEVENT
the Class object to create the methods

ITEMEVENT

public static final java.lang.Class ITEMEVENT
the Class object to create the methods

ARG_ACTIONEVENT

public static final java.lang.Class[] ARG_ACTIONEVENT

ARG_ITEMEVENT

public static final java.lang.Class[] ARG_ITEMEVENT
Constructor Detail

ActionManager

public ActionManager()
Method Detail

add

public static void add(java.lang.Object compo,
                       java.lang.String func,
                       java.lang.Object handler)
                throws java.lang.NoSuchMethodException,
                       java.lang.SecurityException
add an action listener

addItem

public static void addItem(java.lang.Object compo,
                           java.lang.String func,
                           java.lang.Object handler)
                    throws java.lang.NoSuchMethodException,
                           java.lang.SecurityException
add an item listener

remove

public static void remove(java.awt.Component compo)
remove the listened object

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
implements ActionListener redirection
Specified by:
actionPerformed in interface java.awt.event.ActionListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent event)
implements ItemListener redirection
Specified by:
itemStateChanged in interface java.awt.event.ItemListener