Java Code Examples for java.awt.AWTKeyStroke#getAWTKeyStroke()
The following examples show how to use
java.awt.AWTKeyStroke#getAWTKeyStroke() .
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: XEmbedHelper.java From dragonwell8_jdk with GNU General Public License v2.0 | 6 votes |
AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) { XBaseWindow.checkSecurity(); int keycode; XToolkit.awtLock(); try { XKeysym.Keysym2JavaKeycode kc = XKeysym.getJavaKeycode( keysym ); if(kc == null) { keycode = java.awt.event.KeyEvent.VK_UNDEFINED; }else{ keycode = kc.getJavaKeycode(); } } finally { XToolkit.awtUnlock(); } int modifiers = getModifiers((int)state); return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers); }
Example 2
Source File: XEmbedHelper.java From openjdk-8-source with GNU General Public License v2.0 | 6 votes |
AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) { XBaseWindow.checkSecurity(); int keycode; XToolkit.awtLock(); try { XKeysym.Keysym2JavaKeycode kc = XKeysym.getJavaKeycode( keysym ); if(kc == null) { keycode = java.awt.event.KeyEvent.VK_UNDEFINED; }else{ keycode = kc.getJavaKeycode(); } } finally { XToolkit.awtUnlock(); } int modifiers = getModifiers((int)state); return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers); }
Example 3
Source File: XEmbedHelper.java From jdk8u_jdk with GNU General Public License v2.0 | 6 votes |
AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) { XBaseWindow.checkSecurity(); int keycode; XToolkit.awtLock(); try { XKeysym.Keysym2JavaKeycode kc = XKeysym.getJavaKeycode( keysym ); if(kc == null) { keycode = java.awt.event.KeyEvent.VK_UNDEFINED; }else{ keycode = kc.getJavaKeycode(); } } finally { XToolkit.awtUnlock(); } int modifiers = getModifiers((int)state); return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers); }
Example 4
Source File: XEmbedHelper.java From jdk8u-jdk with GNU General Public License v2.0 | 6 votes |
AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) { XBaseWindow.checkSecurity(); int keycode; XToolkit.awtLock(); try { XKeysym.Keysym2JavaKeycode kc = XKeysym.getJavaKeycode( keysym ); if(kc == null) { keycode = java.awt.event.KeyEvent.VK_UNDEFINED; }else{ keycode = kc.getJavaKeycode(); } } finally { XToolkit.awtUnlock(); } int modifiers = getModifiers((int)state); return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers); }
Example 5
Source File: XEmbedHelper.java From hottub with GNU General Public License v2.0 | 6 votes |
AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) { XBaseWindow.checkSecurity(); int keycode; XToolkit.awtLock(); try { XKeysym.Keysym2JavaKeycode kc = XKeysym.getJavaKeycode( keysym ); if(kc == null) { keycode = java.awt.event.KeyEvent.VK_UNDEFINED; }else{ keycode = kc.getJavaKeycode(); } } finally { XToolkit.awtUnlock(); } int modifiers = getModifiers((int)state); return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers); }
Example 6
Source File: XEmbedHelper.java From openjdk-jdk8u with GNU General Public License v2.0 | 6 votes |
AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) { XBaseWindow.checkSecurity(); int keycode; XToolkit.awtLock(); try { XKeysym.Keysym2JavaKeycode kc = XKeysym.getJavaKeycode( keysym ); if(kc == null) { keycode = java.awt.event.KeyEvent.VK_UNDEFINED; }else{ keycode = kc.getJavaKeycode(); } } finally { XToolkit.awtUnlock(); } int modifiers = getModifiers((int)state); return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers); }
Example 7
Source File: TestAWTKeyStroke.java From openjdk-jdk9 with GNU General Public License v2.0 | 6 votes |
private static void checkAWTKeyStroke(int keyCode, int modifiers, boolean onKeyRelease) throws Exception { AWTKeyStroke awtKeyStroke1 = AWTKeyStroke.getAWTKeyStroke( keyCode, modifiers, onKeyRelease); checkAWTKeyStroke(awtKeyStroke1, keyCode, modifiers, onKeyRelease); AWTKeyStroke awtKeyStroke2 = AWTKeyStroke.getAWTKeyStroke( keyCode, modifiers, onKeyRelease); if (awtKeyStroke1 != awtKeyStroke2) { throw new RuntimeException("AWTKeyStroke is not cached!"); } checkSerializedKeyStroke(awtKeyStroke1); }
Example 8
Source File: XEmbedHelper.java From openjdk-8 with GNU General Public License v2.0 | 6 votes |
AWTKeyStroke getKeyStrokeForKeySym(long keysym, long state) { XBaseWindow.checkSecurity(); int keycode; XToolkit.awtLock(); try { XKeysym.Keysym2JavaKeycode kc = XKeysym.getJavaKeycode( keysym ); if(kc == null) { keycode = java.awt.event.KeyEvent.VK_UNDEFINED; }else{ keycode = kc.getJavaKeycode(); } } finally { XToolkit.awtUnlock(); } int modifiers = getModifiers((int)state); return AWTKeyStroke.getAWTKeyStroke(keycode, modifiers); }
Example 9
Source File: InputContext.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 5 votes |
private AWTKeyStroke getInputMethodSelectionKeyStroke(Preferences root) { try { if (root.nodeExists(inputMethodSelectionKeyPath)) { Preferences node = root.node(inputMethodSelectionKeyPath); int keyCode = node.getInt(inputMethodSelectionKeyCodeName, KeyEvent.VK_UNDEFINED); if (keyCode != KeyEvent.VK_UNDEFINED) { int modifiers = node.getInt(inputMethodSelectionKeyModifiersName, 0); return AWTKeyStroke.getAWTKeyStroke(keyCode, modifiers); } } } catch (BackingStoreException bse) { } return null; }
Example 10
Source File: InputContext.java From dragonwell8_jdk with GNU General Public License v2.0 | 5 votes |
private AWTKeyStroke getInputMethodSelectionKeyStroke(Preferences root) { try { if (root.nodeExists(inputMethodSelectionKeyPath)) { Preferences node = root.node(inputMethodSelectionKeyPath); int keyCode = node.getInt(inputMethodSelectionKeyCodeName, KeyEvent.VK_UNDEFINED); if (keyCode != KeyEvent.VK_UNDEFINED) { int modifiers = node.getInt(inputMethodSelectionKeyModifiersName, 0); return AWTKeyStroke.getAWTKeyStroke(keyCode, modifiers); } } } catch (BackingStoreException bse) { } return null; }
Example 11
Source File: InputContext.java From Bytecoder with Apache License 2.0 | 5 votes |
private AWTKeyStroke getInputMethodSelectionKeyStroke(Preferences root) { try { if (root.nodeExists(inputMethodSelectionKeyPath)) { Preferences node = root.node(inputMethodSelectionKeyPath); int keyCode = node.getInt(inputMethodSelectionKeyCodeName, KeyEvent.VK_UNDEFINED); if (keyCode != KeyEvent.VK_UNDEFINED) { int modifiers = node.getInt(inputMethodSelectionKeyModifiersName, 0); return AWTKeyStroke.getAWTKeyStroke(keyCode, modifiers); } } } catch (BackingStoreException bse) { } return null; }
Example 12
Source File: java_awt_AWTKeyStroke.java From openjdk-jdk9 with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_A, InputEvent.SHIFT_DOWN_MASK, true); }
Example 13
Source File: java_awt_AWTKeyStroke.java From openjdk-8 with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_A, InputEvent.SHIFT_DOWN_MASK, true); }
Example 14
Source File: java_awt_AWTKeyStroke.java From TencentKona-8 with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getAnotherObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_DOWN_MASK); }
Example 15
Source File: java_awt_AWTKeyStroke.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_A, InputEvent.SHIFT_DOWN_MASK, true); }
Example 16
Source File: java_awt_AWTKeyStroke.java From openjdk-jdk8u with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getAnotherObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_DOWN_MASK); }
Example 17
Source File: java_awt_AWTKeyStroke.java From hottub with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_A, InputEvent.SHIFT_DOWN_MASK, true); }
Example 18
Source File: java_awt_AWTKeyStroke.java From jdk8u-dev-jdk with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getAnotherObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_Z, InputEvent.CTRL_DOWN_MASK); }
Example 19
Source File: java_awt_AWTKeyStroke.java From openjdk-8-source with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_A, InputEvent.SHIFT_DOWN_MASK, true); }
Example 20
Source File: java_awt_AWTKeyStroke.java From dragonwell8_jdk with GNU General Public License v2.0 | 4 votes |
protected AWTKeyStroke getObject() { return AWTKeyStroke.getAWTKeyStroke(KeyEvent.VK_A, InputEvent.SHIFT_DOWN_MASK, true); }