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

Method setCallback

src/dorkbox/systemTray/MenuItem.java:390–397  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers 4

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

Calls 1

setCallbackMethod · 0.65

Tested by 3

TestTrayMethod · 0.76
TestTraySwtMethod · 0.76
doJavaFxStuffMethod · 0.76