Uses 8614K of libraries. Click here for Pure Java version (1131L/8K/28K).
1 | !7 |
2 | |
3 | lib 1009154 lib 1004016 // SystemTray, slf4j |
4 | lib 1009055 lib 1009056 // JNA |
5 | lib 1009157 // javassist for Windows fixes |
6 | |
7 | import dorkbox.systemTray.*; |
8 | import dorkbox.systemTray.SystemTray; |
9 | import dorkbox.systemTray.MenuItem; |
10 | //import dorkbox.systemTray.swingUI.*; |
11 | |
12 | p { |
13 | // SystemTray.SWING_UI = new CustomSwingUI(); |
14 | |
15 | print("Getting SystemTray"); |
16 | final SystemTray systemTray = SystemTray.get(); |
17 | if (systemTray == null) |
18 | fail("Unable to load SystemTray!"); |
19 | print("Got."); |
20 | |
21 | pcall { |
22 | systemTray.setImage(loadImage2(#1003596)); |
23 | print("Set image"); |
24 | } |
25 | |
26 | systemTray.setStatus("Not Running"); |
27 | print("Set status"); |
28 | |
29 | systemTray.getMenu().add(new MenuItem("Quit", actionListener(r { |
30 | //systemTray.shutdown(); |
31 | System.exit(0); |
32 | }))).setShortcut('q'); // case does not matter |
33 | |
34 | print("Added menu item"); |
35 | } |
download show line numbers debug dex old transpilations
Travelled to 17 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, dpnavvvsbarw, estmjqchrwzt, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, nnmtytuibrzp, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, wtqryiryparv
No comments. add comment
Snippet ID: | #1009155 |
Snippet name: | Test dorkbox SystemTray |
Eternal ID of this version: | #1009155/15 |
Text MD5: | 734530ff2aa9ad09ac66176bfe9448a8 |
Transpilation MD5: | 53bb638b0776262706d6180c75b16218 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-07-06 23:36:03 |
Source code size: | 868 bytes / 35 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 657 / 807 |
Version history: | 14 change(s) |
Referenced in: | [show references] |