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)
| 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. |