public KeyStroke getOptionalKeyStroke(final String key, final int mask) { final String name = getString(key); if (name != null && name.length() > 0) { return KeyStroke.getKeyStroke(createMnemonic(name).intValue(), mask); } return null; }
public Integer getOptionalMnemonic(final String key) { final String name = getString(key); if (name != null && name.length() > 0) { return createMnemonic(name); } return null; }
/** * Returns an optional key stroke. * * @param key the key. * @param mask the mask. * * @return The key stroke. */ public KeyStroke getOptionalKeyStroke(final String key, final int mask) { final String name = getString(key); if (name != null && name.length() > 0) { return KeyStroke.getKeyStroke(createMnemonic(name).intValue(), mask); } return null; }
/** * Returns an optional mnemonic. * * @param key the key. * * @return The mnemonic. */ public Integer getOptionalMnemonic(final String key) { final String name = getString(key); if (name != null && name.length() > 0) { return createMnemonic(name); } return null; }
/** * Returns an optional mnemonic. * * @param key the key. * * @return The mnemonic. */ public Integer getOptionalMnemonic(final String key) { final String name = getString(key); if (name != null && name.length() > 0) { return createMnemonic(name); } return null; }
/** * Returns an optional key stroke. * * @param key the key. * @param mask the mask. * * @return The key stroke. */ public KeyStroke getOptionalKeyStroke(final String key, final int mask) { final String name = getString(key); if (name != null && name.length() > 0) { return KeyStroke.getKeyStroke(createMnemonic(name).intValue(), mask); } return null; }
/** * Returns the mnemonic stored at the given resourcebundle key. The mnemonic * should be either the symbolic name of one of the KeyEvent.VK_* constants * (without the 'VK_') or the character for that key. * <p> * For the enter key, the resource bundle would therefore either contain * "ENTER" or "\n".</p> * <pre> * a.resourcebundle.key=ENTER * an.other.resourcebundle.key=\n * </pre> * * @param key the resourcebundle key * @return the mnemonic */ public Integer getMnemonic(final String key) { final String name = getString(key); return createMnemonic(name); }
/** * Returns the mnemonic stored at the given resourcebundle key. The mnemonic * should be either the symbolic name of one of the KeyEvent.VK_* constants * (without the 'VK_') or the character for that key. * <p/> * For the enter key, the resource bundle would therefore either contain * "ENTER" or "\n". * <pre> * a.resourcebundle.key=ENTER * an.other.resourcebundle.key=\n * </pre> * * @param key the resourcebundle key * @return the mnemonic */ public Integer getMnemonic(final String key) { final String name = getString(key); return createMnemonic(name); }
/** * Returns the mnemonic stored at the given resourcebundle key. The mnemonic * should be either the symbolic name of one of the KeyEvent.VK_* constants * (without the 'VK_') or the character for that key. * <p/> * For the enter key, the resource bundle would therefore either contain * "ENTER" or "\n". * <pre> * a.resourcebundle.key=ENTER * an.other.resourcebundle.key=\n * </pre> * * @param key the resourcebundle key * @return the mnemonic */ public Integer getMnemonic(final String key) { final String name = getString(key); return createMnemonic(name); }
/** * Returns the keystroke stored at the given resourcebundle key. * <p/> * The keystroke will be composed of a simple key press and the given * KeyMask. If the KeyMask is zero, a plain Keystroke is returned. * <p/> * The keystrokes character key should be either the symbolic name of one of * the KeyEvent.VK_* constants or the character for that key. * <p/> * For the 'A' key, the resource bundle would therefore either contain * "VK_A" or "a". * <pre> * a.resourcebundle.key=VK_A * an.other.resourcebundle.key=a * </pre> * * @param key the resourcebundle key * @return the mnemonic * @see Toolkit#getMenuShortcutKeyMask() */ public KeyStroke getKeyStroke(final String key, final int mask) { final String name = getString(key); return KeyStroke.getKeyStroke(createMnemonic(name).intValue(), mask); }
/** * Returns the keystroke stored at the given resourcebundle key. * <p/> * The keystroke will be composed of a simple key press and the given * KeyMask. If the KeyMask is zero, a plain Keystroke is returned. * <p/> * The keystrokes character key should be either the symbolic name of one of * the KeyEvent.VK_* constants or the character for that key. * <p/> * For the 'A' key, the resource bundle would therefore either contain * "VK_A" or "a". * <pre> * a.resourcebundle.key=VK_A * an.other.resourcebundle.key=a * </pre> * * @param key the resourcebundle key. * @param mask the mask. * * @return the mnemonic * @see Toolkit#getMenuShortcutKeyMask() */ public KeyStroke getKeyStroke(final String key, final int mask) { final String name = getString(key); return KeyStroke.getKeyStroke(createMnemonic(name).intValue(), mask); }
/** * Returns the keystroke stored at the given resourcebundle key. * <p> * The keystroke will be composed of a simple key press and the given * KeyMask. If the KeyMask is zero, a plain Keystroke is returned.</p> * <p> * The keystrokes character key should be either the symbolic name of one of * the KeyEvent.VK_* constants or the character for that key.</p> * <p> * For the 'A' key, the resource bundle would therefore either contain * "VK_A" or "a".</p> * <pre> * a.resourcebundle.key=VK_A * an.other.resourcebundle.key=a * </pre> * * @param key the resourcebundle key. * @param mask the mask. * * @return the mnemonic * @see Toolkit#getMenuShortcutKeyMask() */ public KeyStroke getKeyStroke(final String key, final int mask) { final String name = getString(key); return KeyStroke.getKeyStroke(createMnemonic(name).intValue(), mask); }