MCPcopy Create free account
hub / github.com/dorkbox/SystemTray / setShortcut

Method setShortcut

src/dorkbox/systemTray/MenuItem.java:419–426  ·  view source on GitHub ↗

Sets a menu entry shortcut key (Mnemonic) so that menu entry can be "selected" via the keyboard while the menu is displayed. Mnemonics are case-insensitive, and if the character defined by the mnemonic is found within the text, the first occurrence of it will be underlined. @param key this is the

(final char key)

Source from the content-addressed store, hash-verified

417 * @param key this is the key to set as the mnemonic
418 */
419 public
420 void setShortcut(final char key) {
421 this.mnemonicKey = key;
422
423 if (peer != null) {
424 ((MenuItemPeer) peer).setShortcut(this);
425 }
426 }
427
428 /**
429 * Sets a menu entry shortcut key (Mnemonic) so that menu entry can be "selected" via the keyboard while the menu is displayed.

Callers 4

TestTrayMethod · 0.95
TestTraySwtMethod · 0.95
doJavaFxStuffMethod · 0.95
MenuItemMethod · 0.95

Calls 1

setShortcutMethod · 0.65

Tested by 3

TestTrayMethod · 0.76
TestTraySwtMethod · 0.76
doJavaFxStuffMethod · 0.76