Libraryless. Click here for Pure Java version (15786L/110K).
1 | !7 |
2 | |
3 | module TaskBar_dev extends DynObjectTable<S> { |
4 | transient SimpleLiveValue<S> lvInvisible = stringLiveValue(); |
5 | |
6 | start { |
7 | dontPersist(); |
8 | defaultAction = voidfunc(S id) { dm_showModule(id) }; |
9 | itemToMap = itemToMap_calcSingleColumn("Module", f dm_moduleName); |
10 | ownResource(vmBus_onModulesListChange(rstUpdate())); |
11 | rstUpdate().trigger(); |
12 | } |
13 | |
14 | void update { |
15 | L invis = dm_invisibleModules(); |
16 | lvInvisible.set(empty(invis) ? "" : "+ " + l(invis) + " invisible"); |
17 | data = null; // force update |
18 | setData(sortedByCalculatedFieldIC(f dm_moduleName, dm_visibleModuleIDs())); |
19 | } |
20 | |
21 | visualize { |
22 | JComponent c = super.visualize(); |
23 | for (final Pair<S, VF1<O>> p : dm_moduleMenuItems()) |
24 | tablePopupMenuItem(table, |
25 | p.a, voidfunc(final int row) { thread { callF(p.b, dm_getModule(_get(data, row))); } }); |
26 | ret northAndCenter( |
27 | withMargin(3, onLeftClick(jRightAlignedLiveValueLabel(lvInvisible), r dm_showInvisibleModulesList)), |
28 | c); |
29 | } |
30 | |
31 | enhanceFrame { |
32 | addTitlePopupMenuItems(f, "Place on the right", rThread placeOnRight); |
33 | } |
34 | |
35 | void placeOnRight enter { dm_placeOnRight(); } |
36 | } |
Began life as a copy of #1018410
download show line numbers debug dex old transpilations
Travelled to 12 computer(s): bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019172 |
Snippet name: | Task Bar [vertical only, faster than #1018410] |
Eternal ID of this version: | #1019172/18 |
Text MD5: | f2f85239bde2e0b2afe2055e1d579ed6 |
Transpilation MD5: | d107814057bb7f856d546cdc99a566db |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-11-28 14:10:49 |
Source code size: | 1183 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 459 / 7873 |
Version history: | 17 change(s) |
Referenced in: | [show references] |