【发布时间】:2012-01-04 18:12:21
【问题描述】:
我需要设置 ENTER 键以在 com.vaadin.ui.Panel 上的启用字段之间导航。我怎样才能以编程方式做到这一点?
这是我的意图,但现在不知道如何发送按键:
Action ENTER_KEY_ACTION = new ShortcutAction(
"Enter key"
, ShortcutAction.KeyCode.ENTER
, null
);
public Action[] getActions(Object target, Object sender) {
return new Action[] { ENTER_KEY_ACTION};
}
public void handleAction(Action action, Object sender, Object target) {
if (action == ENTER_KEY_ACTION ) {
ENTERKeyHandler();
}
}
protected void ENTERKeyHandler(){
//
//here i need to send a TAB keyPress
//
}
到目前为止,这段代码运行良好,但还没有结束。不知道有没有其他方法可以做到这一点? 请原谅我的英语。
【问题讨论】:
标签: user-interface vaadin