package mdd.client; import org.json.simple.JSONObject; import java.util.Vector; public class GUIEventHandler { private Vector _clients = new Vector(); public GUIEventHandler(){ } public void addEventListener(IGUIEventClient client){ _clients.add(client); } public void removeEventListener(IGUIEventClient client){ _clients.remove(client); } public void publishEvent(String event, JSONObject args){ for (IGUIEventClient client : _clients) { client.processGUIEvent(event, args); } }; }