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