| 12345678910111213141516171819202122232425262728 |
- package mdd.client;
- import org.json.simple.JSONObject;
- import java.util.Vector;
- public class GUIEventHandler {
- private Vector<IGUIEventClient> _clients = new Vector<IGUIEventClient>();
- 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);
- }
- };
- }
|