本文整理了Java中com.google.gwt.user.client.Event.getAltKey()
方法的一些代码示例,展示了Event.getAltKey()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Event.getAltKey()
方法的具体详情如下:
包路径:com.google.gwt.user.client.Event
类名称:Event
方法名:getAltKey
暂无
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets whether the ALT key was depressed when the given event occurred.
*
* @param evt the event to be tested
* @return <code>true</code> if ALT was depressed when the event occurred
* @deprecated Use {@link Event#getAltKey()} instead.
*/
@Deprecated
public static boolean eventGetAltKey(Event evt) {
return evt.getAltKey();
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Gets the keyboard modifiers associated with a DOMEvent.
*
* @param event the event.
* @return the modifiers as defined in {@link KeyboardListener}.
*/
public static int getKeyboardModifiers(Event event) {
return (event.getShiftKey() ? KeyboardListener.MODIFIER_SHIFT : 0)
| (event.getMetaKey() ? KeyboardListener.MODIFIER_META : 0)
| (event.getCtrlKey() ? KeyboardListener.MODIFIER_CTRL : 0)
| (event.getAltKey() ? KeyboardListener.MODIFIER_ALT : 0);
}
代码示例来源:origin: com.google.gwt/gwt-servlet
/**
* Default version, useful for Firefox. Don't fire if it's a rightclick,
* middleclick, or if any modifiers are held down.
*/
public boolean handleAsClick(Event event) {
int mouseButtons = event.getButton();
boolean alt = event.getAltKey();
boolean ctrl = event.getCtrlKey();
boolean meta = event.getMetaKey();
boolean shift = event.getShiftKey();
boolean modifiers = alt || ctrl || meta || shift;
boolean middle = mouseButtons == Event.BUTTON_MIDDLE;
boolean right = mouseButtons == Event.BUTTON_RIGHT;
return !modifiers && !middle && !right;
}
}
代码示例来源:origin: com.google.gwt/gwt-servlet
@Override
public boolean handleAsClick(Event event) {
int mouseButtons = event.getButton();
boolean alt = event.getAltKey();
boolean ctrl = event.getCtrlKey();
boolean meta = event.getMetaKey();
boolean shift = event.getShiftKey();
boolean middle = mouseButtons == Event.BUTTON_MIDDLE;
boolean right = mouseButtons == Event.BUTTON_RIGHT;
boolean modifiers = alt || ctrl || meta;
if (shiftIsModifier) {
modifiers |= shift;
}
return !modifiers && !middle && !right;
}
}
代码示例来源:origin: pt.ist/svgwt
/**
* Returns <code>true</code> if the alt key is pressed.
*
* @return the alt key state
*/
public boolean isAltDown() {
return _event.getAltKey();
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets whether the ALT key was depressed when the given event occurred.
*
* @param evt the event to be tested
* @return <code>true</code> if ALT was depressed when the event occurred
* @deprecated Use {@link Event#getAltKey()} instead.
*/
@Deprecated
public static boolean eventGetAltKey(Event evt) {
return evt.getAltKey();
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets whether the ALT key was depressed when the given event occurred.
*
* @param evt the event to be tested
* @return <code>true</code> if ALT was depressed when the event occurred
* @deprecated Use {@link Event#getAltKey()} instead.
*/
@Deprecated
public static boolean eventGetAltKey(Event evt) {
return evt.getAltKey();
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
protected boolean isShortcut(Event event) {
return event.getShiftKey() || event.getAltKey() || event.getCtrlKey() || event.getMetaKey();
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
public static boolean isAnyModifierKeyPressed(Event event) {
return (event.getShiftKey()
|| event.getAltKey()
|| event.getCtrlKey()
|| event.getMetaKey());
}
代码示例来源:origin: com.google.gwt/gwt-servlet
case Event.ONKEYUP:
if (event.getAltKey() || event.getMetaKey()) {
super.onBrowserEvent(event);
return;
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Gets the keyboard modifiers associated with a DOMEvent.
*
* @param event the event.
* @return the modifiers as defined in {@link KeyboardListener}.
*/
public static int getKeyboardModifiers(Event event) {
return (event.getShiftKey() ? KeyboardListener.MODIFIER_SHIFT : 0)
| (event.getMetaKey() ? KeyboardListener.MODIFIER_META : 0)
| (event.getCtrlKey() ? KeyboardListener.MODIFIER_CTRL : 0)
| (event.getAltKey() ? KeyboardListener.MODIFIER_ALT : 0);
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Gets the keyboard modifiers associated with a DOMEvent.
*
* @param event the event.
* @return the modifiers as defined in {@link KeyboardListener}.
*/
public static int getKeyboardModifiers(Event event) {
return (event.getShiftKey() ? KeyboardListener.MODIFIER_SHIFT : 0)
| (event.getMetaKey() ? KeyboardListener.MODIFIER_META : 0)
| (event.getCtrlKey() ? KeyboardListener.MODIFIER_CTRL : 0)
| (event.getAltKey() ? KeyboardListener.MODIFIER_ALT : 0);
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
protected boolean isShortcut(Event event) {
return event.getShiftKey() || event.getAltKey() || event.getCtrlKey() || event.getMetaKey();
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
@Override
public boolean handleAsClick(Event event) {
int mouseButtons = event.getButton();
boolean alt = event.getAltKey();
boolean ctrl = event.getCtrlKey();
boolean meta = event.getMetaKey();
boolean shift = event.getShiftKey();
boolean middle = mouseButtons == Event.BUTTON_MIDDLE;
boolean right = mouseButtons == Event.BUTTON_RIGHT;
boolean modifiers = alt || ctrl || meta;
if (shiftIsModifier) {
modifiers |= shift;
}
return !modifiers && !middle && !right;
}
}
代码示例来源:origin: net.wetheinter/gwt-user
/**
* Default version, useful for Firefox. Don't fire if it's a rightclick,
* middleclick, or if any modifiers are held down.
*/
public boolean handleAsClick(Event event) {
int mouseButtons = event.getButton();
boolean alt = event.getAltKey();
boolean ctrl = event.getCtrlKey();
boolean meta = event.getMetaKey();
boolean shift = event.getShiftKey();
boolean modifiers = alt || ctrl || meta || shift;
boolean middle = mouseButtons == Event.BUTTON_MIDDLE;
boolean right = mouseButtons == Event.BUTTON_RIGHT;
return !modifiers && !middle && !right;
}
}
代码示例来源:origin: net.wetheinter/gwt-user
@Override
public boolean handleAsClick(Event event) {
int mouseButtons = event.getButton();
boolean alt = event.getAltKey();
boolean ctrl = event.getCtrlKey();
boolean meta = event.getMetaKey();
boolean shift = event.getShiftKey();
boolean middle = mouseButtons == Event.BUTTON_MIDDLE;
boolean right = mouseButtons == Event.BUTTON_RIGHT;
boolean modifiers = alt || ctrl || meta;
if (shiftIsModifier) {
modifiers |= shift;
}
return !modifiers && !middle && !right;
}
}
代码示例来源:origin: com.vaadin.external.gwt/gwt-user
/**
* Default version, useful for Firefox. Don't fire if it's a rightclick,
* middleclick, or if any modifiers are held down.
*/
public boolean handleAsClick(Event event) {
int mouseButtons = event.getButton();
boolean alt = event.getAltKey();
boolean ctrl = event.getCtrlKey();
boolean meta = event.getMetaKey();
boolean shift = event.getShiftKey();
boolean modifiers = alt || ctrl || meta || shift;
boolean middle = mouseButtons == Event.BUTTON_MIDDLE;
boolean right = mouseButtons == Event.BUTTON_RIGHT;
return !modifiers && !middle && !right;
}
}
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
@Override
public void onBrowserEvent(Event event) {
int type = DOM.eventGetType(event);
if (type == Event.ONKEYDOWN
&& event.getKeyCode() == KeyCodes.KEY_ENTER
&& !event.getAltKey()
&& !event.getShiftKey()
&& !event.getCtrlKey()) {
event.stopPropagation();
return;
}
super.onBrowserEvent(event);
}
代码示例来源:origin: net.wetheinter/gwt-user
case Event.ONKEYUP:
if (event.getAltKey() || event.getMetaKey()) {
super.onBrowserEvent(event);
return;
代码示例来源:origin: com.haulmont.cuba/cuba-web-toolkit
&& !event.getAltKey() && !event.getShiftKey()) {
handleRowCtrlClick(event);
} else {
内容来源于网络,如有侵权,请联系作者删除!