Global event-listeners
In some rare cases (especially for debugging purposes) it might be useful to add an event listener that catches all events that are thrown in your application.
In order to achive this, you do *not* need to register the event listener separately for each event that might be triggered, but use the addGlobalListener() instead:
import net.schst.EventDispatcher.*; EventDispatcher disp = EventDispatcher.getInstance(); EventListener glob = new DebugHandler("global"); disp.addGlobalListener(glob); disp.triggerEvent("onLogin"); disp.triggerEvent("onLogout");
This event listener will now be called for both events, the onLogin and the onLogout event.
However, you should be aware, that global event listeners are processed after all local event listeners handled the event.
