本文整理了Java中com.vaadin.ui.Button.removeShortcutListener()
方法的一些代码示例,展示了Button.removeShortcutListener()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Button.removeShortcutListener()
方法的具体详情如下:
包路径:com.vaadin.ui.Button
类名称:Button
方法名:removeShortcutListener
暂无
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Removes the keyboard shortcut previously set with
* {@link #setClickShortcut(int, int...)}.
*/
public void removeClickShortcut() {
if (clickShortcut != null) {
removeShortcutListener(clickShortcut);
clickShortcut = null;
getState().clickShortcutKeyCode = 0;
}
}
代码示例来源:origin: com.vaadin/vaadin-server
/**
* Makes it possible to invoke a click on this button by pressing the given
* {@link KeyCode} and (optional) {@link ModifierKey}s.<br/>
* The shortcut is global (bound to the containing Window).
*
* @param keyCode
* the keycode for invoking the shortcut
* @param modifiers
* the (optional) modifiers for invoking the shortcut, null for
* none
*/
public void setClickShortcut(int keyCode, int... modifiers) {
if (clickShortcut != null) {
removeShortcutListener(clickShortcut);
}
clickShortcut = new ClickShortcut(this, keyCode, modifiers);
addShortcutListener(clickShortcut);
getState().clickShortcutKeyCode = clickShortcut.getKeyCode();
}
代码示例来源:origin: de.mhus.lib/mhu-lib-vaadin
@Override
public void buttonClick(ClickEvent event) {
if ("".equals(password.getValue())) {
password.focus();
return;
}
error.setCaption("");
if (listener != null && listener.doLogin(username.getValue(),password.getValue())) {
signin.removeShortcutListener(enter);
} else {
// Add new error message
error.setCaption(MNls.find(LoginPanel.this, "login.error=Wrong username or password."));
username.focus();
}
}
});
内容来源于网络,如有侵权,请联系作者删除!