1 package jp.ac.aiit.xdf.component.swing.event;
3 import java.util.HashMap;
6 import jp.ac.aiit.xdf.core.action.Action;
7 import jp.ac.aiit.xdf.core.action.EventHandler;
8 import jp.ac.aiit.xdf.core.action.EventType;
9 import jp.ac.aiit.xdf.core.model.ObjectModel;
15 public class SwingEventHandler implements EventHandler{
16 public void setEvent(ObjectModel target, Object component, Action action) { }
18 protected static boolean hasAction(Map<EventType, Action> actions, EventType ...events) {
19 for(EventType event : events) {
20 if( actions.containsKey(event) ) {
28 * Swingの共通イベントバンディング方法を取得する
29 * @return 共通イベントバンディング方法
31 public static Map<String, EventHandler> commonEvent(){
32 Map<String, EventHandler> action = new HashMap<String, EventHandler>();
33 action.put("focus", new FocusEventHandler(SwingEventType.FOCUS));
34 action.put("focuslose", new FocusEventHandler(SwingEventType.FOCUSLOSE));