1 package jp.ac.aiit.xdf.component.swing.event;
3 import java.awt.Component;
5 import jp.ac.aiit.xdf.core.action.Action;
6 import jp.ac.aiit.xdf.core.model.ObjectModel;
10 * Swing コンポーネントにKeyEventにて、ユーザ定義アクションをバンディングする
15 public class KeyEventHandler extends SwingEventHandler{
16 private SwingEventType eventType;
20 * @param eventType イベントタイプ:ユーザガイドのアクションの実装にイベント名を示しているもの
22 public KeyEventHandler(SwingEventType eventType){
23 this.eventType = eventType;
27 public void setEvent(ObjectModel target, Object component, Action action) {
28 UIEventListener listener = new UIEventListener(target, eventType, action);
30 ((Component)component).addKeyListener(listener);