Java Code Examples for java.awt.event.InputEvent#ALT_GRAPH_MASK
The following examples show how to use
java.awt.event.InputEvent#ALT_GRAPH_MASK .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DragSourceDragEvent.java From hottub with GNU General Public License v2.0 | 6 votes |
/** * Sets old modifiers by the new ones. */ private void setOldModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_MASK; } if ((gestureModifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_MASK; } if ((gestureModifiers & InputEvent.CTRL_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_MASK; } }
Example 2
Source File: DragSourceDragEvent.java From JDKSourceCode1.8 with MIT License | 6 votes |
/** * Sets new modifiers by the old ones. * The mouse modifiers have higher priority than overlaying key * modifiers. */ private void setNewModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_DOWN_MASK; } if ((gestureModifiers & InputEvent.SHIFT_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((gestureModifiers & InputEvent.CTRL_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_DOWN_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } }
Example 3
Source File: AWTKeyStroke.java From JDKSourceCode1.8 with MIT License | 6 votes |
private static int mapNewModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { modifiers |= InputEvent.SHIFT_MASK; } if ((modifiers & InputEvent.ALT_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_MASK; } if ((modifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_GRAPH_MASK; } if ((modifiers & InputEvent.CTRL_DOWN_MASK) != 0) { modifiers |= InputEvent.CTRL_MASK; } if ((modifiers & InputEvent.META_DOWN_MASK) != 0) { modifiers |= InputEvent.META_MASK; } return modifiers; }
Example 4
Source File: DragSourceDragEvent.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets old modifiers by the new ones. */ private void setOldModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_MASK; } if ((gestureModifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_MASK; } if ((gestureModifiers & InputEvent.CTRL_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_MASK; } }
Example 5
Source File: DragSourceDragEvent.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Sets old modifiers by the new ones. */ private void setOldModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_MASK; } if ((gestureModifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_MASK; } if ((gestureModifiers & InputEvent.CTRL_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_MASK; } }
Example 6
Source File: DragSourceDragEvent.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Sets new modifiers by the old ones. * The mouse modifiers have higher priority than overlaying key * modifiers. */ private void setNewModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_DOWN_MASK; } if ((gestureModifiers & InputEvent.SHIFT_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((gestureModifiers & InputEvent.CTRL_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_DOWN_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } }
Example 7
Source File: X11MaskDefinitions.java From SikuliX1 with MIT License | 6 votes |
/** * Converts an AWT mask into a X11 mask. * * @param awtMask * @return */ public static int awtMaskToX11Mask(int awtMask) { int x11Mask = 0; if ((awtMask & InputEvent.SHIFT_MASK) != 0 || (awtMask & InputEvent.SHIFT_DOWN_MASK) != 0) { x11Mask |= X11MaskDefinitions.X11_SHIFT_MASK; } if ((awtMask & InputEvent.ALT_MASK) != 0 || (awtMask & InputEvent.ALT_DOWN_MASK) != 0) { x11Mask |= X11MaskDefinitions.X11_MOD1_MASK; } if ((awtMask & InputEvent.CTRL_MASK) != 0 || (awtMask & InputEvent.CTRL_DOWN_MASK) != 0) { x11Mask |= X11MaskDefinitions.X11_CONTROL_MASK; } if ((awtMask & InputEvent.META_MASK) != 0 || (awtMask & InputEvent.META_DOWN_MASK) != 0) { x11Mask |= X11MaskDefinitions.X11_MOD2_MASK; } if ((awtMask & InputEvent.ALT_GRAPH_MASK) != 0 || (awtMask & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { x11Mask |= X11MaskDefinitions.X11_MOD5_MASK; } return x11Mask; }
Example 8
Source File: AWTKeyStroke.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 6 votes |
private static int mapNewModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { modifiers |= InputEvent.SHIFT_MASK; } if ((modifiers & InputEvent.ALT_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_MASK; } if ((modifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_GRAPH_MASK; } if ((modifiers & InputEvent.CTRL_DOWN_MASK) != 0) { modifiers |= InputEvent.CTRL_MASK; } if ((modifiers & InputEvent.META_DOWN_MASK) != 0) { modifiers |= InputEvent.META_MASK; } return modifiers; }
Example 9
Source File: DragSourceDragEvent.java From openjdk-jdk8u-backup with GNU General Public License v2.0 | 6 votes |
/** * Sets old modifiers by the new ones. */ private void setOldModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_MASK; } if ((gestureModifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_MASK; } if ((gestureModifiers & InputEvent.CTRL_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_MASK; } }
Example 10
Source File: DragSourceDragEvent.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Sets old modifiers by the new ones. */ @SuppressWarnings("deprecation") private void setOldModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_MASK; } if ((gestureModifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_MASK; } if ((gestureModifiers & InputEvent.CTRL_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_MASK; } }
Example 11
Source File: DragSourceDragEvent.java From Bytecoder with Apache License 2.0 | 6 votes |
/** * Sets new modifiers by the old ones. * The mouse modifiers have higher priority than overlaying key * modifiers. */ @SuppressWarnings("deprecation") private void setNewModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_DOWN_MASK; } if ((gestureModifiers & InputEvent.SHIFT_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((gestureModifiers & InputEvent.CTRL_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_DOWN_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } }
Example 12
Source File: DragSourceDragEvent.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
/** * Sets old modifiers by the new ones. */ private void setOldModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_MASK; } if ((gestureModifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_MASK; } if ((gestureModifiers & InputEvent.CTRL_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_MASK; } }
Example 13
Source File: AWTKeyStroke.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
private static int mapNewModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_DOWN_MASK) != 0) { modifiers |= InputEvent.SHIFT_MASK; } if ((modifiers & InputEvent.ALT_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_MASK; } if ((modifiers & InputEvent.ALT_GRAPH_DOWN_MASK) != 0) { modifiers |= InputEvent.ALT_GRAPH_MASK; } if ((modifiers & InputEvent.CTRL_DOWN_MASK) != 0) { modifiers |= InputEvent.CTRL_MASK; } if ((modifiers & InputEvent.META_DOWN_MASK) != 0) { modifiers |= InputEvent.META_MASK; } return modifiers; }
Example 14
Source File: DragSourceDragEvent.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets new modifiers by the old ones. * The mouse modifiers have higher priority than overlaying key * modifiers. */ private void setNewModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_DOWN_MASK; } if ((gestureModifiers & InputEvent.SHIFT_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((gestureModifiers & InputEvent.CTRL_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_DOWN_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } }
Example 15
Source File: DragSourceDragEvent.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
/** * Sets new modifiers by the old ones. * The mouse modifiers have higher priority than overlaying key * modifiers. */ private void setNewModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_DOWN_MASK; } if ((gestureModifiers & InputEvent.SHIFT_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((gestureModifiers & InputEvent.CTRL_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_DOWN_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } }
Example 16
Source File: DragSourceDragEvent.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
/** * Sets new modifiers by the old ones. * The mouse modifiers have higher priority than overlaying key * modifiers. */ private void setNewModifiers() { if ((gestureModifiers & InputEvent.BUTTON1_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON1_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON2_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON2_DOWN_MASK; } if ((gestureModifiers & InputEvent.BUTTON3_MASK) != 0) { gestureModifiers |= InputEvent.BUTTON3_DOWN_MASK; } if ((gestureModifiers & InputEvent.SHIFT_MASK) != 0) { gestureModifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((gestureModifiers & InputEvent.CTRL_MASK) != 0) { gestureModifiers |= InputEvent.CTRL_DOWN_MASK; } if ((gestureModifiers & InputEvent.ALT_GRAPH_MASK) != 0) { gestureModifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } }
Example 17
Source File: AWTKeyStroke.java From openjdk-8-source with GNU General Public License v2.0 | 5 votes |
private static int mapOldModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_MASK) != 0) { modifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((modifiers & InputEvent.ALT_MASK) != 0) { modifiers |= InputEvent.ALT_DOWN_MASK; } if ((modifiers & InputEvent.ALT_GRAPH_MASK) != 0) { modifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } if ((modifiers & InputEvent.CTRL_MASK) != 0) { modifiers |= InputEvent.CTRL_DOWN_MASK; } if ((modifiers & InputEvent.META_MASK) != 0) { modifiers |= InputEvent.META_DOWN_MASK; } modifiers &= InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.ALT_GRAPH_DOWN_MASK | InputEvent.CTRL_DOWN_MASK | InputEvent.META_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK | InputEvent.BUTTON2_DOWN_MASK | InputEvent.BUTTON3_DOWN_MASK; return modifiers; }
Example 18
Source File: AWTKeyStroke.java From Java8CN with Apache License 2.0 | 5 votes |
private static int mapOldModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_MASK) != 0) { modifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((modifiers & InputEvent.ALT_MASK) != 0) { modifiers |= InputEvent.ALT_DOWN_MASK; } if ((modifiers & InputEvent.ALT_GRAPH_MASK) != 0) { modifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } if ((modifiers & InputEvent.CTRL_MASK) != 0) { modifiers |= InputEvent.CTRL_DOWN_MASK; } if ((modifiers & InputEvent.META_MASK) != 0) { modifiers |= InputEvent.META_DOWN_MASK; } modifiers &= InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.ALT_GRAPH_DOWN_MASK | InputEvent.CTRL_DOWN_MASK | InputEvent.META_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK | InputEvent.BUTTON2_DOWN_MASK | InputEvent.BUTTON3_DOWN_MASK; return modifiers; }
Example 19
Source File: AWTKeyStroke.java From hottub with GNU General Public License v2.0 | 5 votes |
private static int mapOldModifiers(int modifiers) { if ((modifiers & InputEvent.SHIFT_MASK) != 0) { modifiers |= InputEvent.SHIFT_DOWN_MASK; } if ((modifiers & InputEvent.ALT_MASK) != 0) { modifiers |= InputEvent.ALT_DOWN_MASK; } if ((modifiers & InputEvent.ALT_GRAPH_MASK) != 0) { modifiers |= InputEvent.ALT_GRAPH_DOWN_MASK; } if ((modifiers & InputEvent.CTRL_MASK) != 0) { modifiers |= InputEvent.CTRL_DOWN_MASK; } if ((modifiers & InputEvent.META_MASK) != 0) { modifiers |= InputEvent.META_DOWN_MASK; } modifiers &= InputEvent.SHIFT_DOWN_MASK | InputEvent.ALT_DOWN_MASK | InputEvent.ALT_GRAPH_DOWN_MASK | InputEvent.CTRL_DOWN_MASK | InputEvent.META_DOWN_MASK | InputEvent.BUTTON1_DOWN_MASK | InputEvent.BUTTON2_DOWN_MASK | InputEvent.BUTTON3_DOWN_MASK; return modifiers; }
Example 20
Source File: ModifierTracker.java From pumpernickel with MIT License | 5 votes |
public static int getModifiers() { return (alt ? InputEvent.ALT_MASK : 0) + (altGraph ? InputEvent.ALT_GRAPH_MASK : 0) + (shift ? InputEvent.SHIFT_MASK : 0) + (ctrl ? InputEvent.CTRL_MASK : 0) + (meta ? InputEvent.META_MASK : 0); }