SpoutDev/SpoutAPI — pull request #31 by t3hk0d3 (2011-10-23 18:16:09+00:00)
Title: Basic induvidual (per element) event system

It's possible to attach event listeners to specific gui element.

Basic subsystem (EventListener/EventSource/AbstractEventSource) in made scalable and could be applied no only for GUI elements.

Example:

GenericButton button = new GenericButton();

button.addEventListener(ButtonClickEvent.class, new EventListener() {

@Override
public void onEvent(ButtonClickEvent event) {
System.out.println("You clicked button! " + event.getButton());
// do something
}
});