Sets a callback for a menu entry. This is the action that occurs when one clicks the menu entry @param callback the callback to set. If null, the callback is safely removed.
(final ActionListener callback)
| 388 | * @param callback the callback to set. If null, the callback is safely removed. |
| 389 | */ |
| 390 | public |
| 391 | void setCallback(final ActionListener callback) { |
| 392 | this.callback = callback; |
| 393 | |
| 394 | if (peer != null) { |
| 395 | ((MenuItemPeer) peer).setCallback(this); |
| 396 | } |
| 397 | } |
| 398 | |
| 399 | /** |
| 400 | * Gets the shortcut key for this menu entry (Mnemonic) which is what menu entry uses to be "selected" via the keyboard while the |