在GWT + UiBinder中,您可以捕获这样的点击:
@UiHandler("cancelButton")
void onCancelButtonClicked(ClickEvent e) {
// cancel code goes here;
}
Run Code Online (Sandbox Code Playgroud)
是否按下了按键?例如,如果用户按下ESC键,则取消操作.
非常感谢.
这应该工作:
@UiHandler("myWidget")
void onKeyDown(KeyDownEvent e) {
// key down code goes here
}
Run Code Online (Sandbox Code Playgroud)
小部件必须实现HasKeyDownHandlers.
| 归档时间: |
|
| 查看次数: |
1356 次 |
| 最近记录: |