|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mozdev.MacroTracker.toolkit.event.EventManager<E>
public class EventManager<E>
This class manages events that can be fired in a program.
This class executes a method taken in and runs them using the parameters taken in through the run() method.
As an example, if we're to use a EventManager for ActionListeners, we'd do this:
EventManagerevents = new EventManager ("actionPerformed"); events.run(new ActionEvent());
Constructor Summary | |
---|---|
EventManager(java.lang.String mtd)
|
Method Summary | |
---|---|
void |
addListener(E event)
Adds an event to be executed when the event that this event manager manages is executed. |
java.util.Iterator<E> |
iterator()
Returns an iterator of all the events contained in this class. |
void |
run()
Runs the method taken into the EventManager and taking no parameters to that method. |
void |
run(java.lang.Object... args)
Runs the method name taken into the EventManager and takes in an array of parameters for the method. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public EventManager(java.lang.String mtd)
mtd
- The method to execute when the events are ran through the
run() method.Method Detail |
---|
public void addListener(E event)
public void run()
run(Object[])
public java.util.Iterator<E> iterator()
public void run(java.lang.Object... args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |