Libraryless. Click here for Pure Java version (15507L/110K).
1 | !7 |
2 | |
3 | sclass LatestChangedSnippets extends DynTable { |
4 | L<Map> data; |
5 | |
6 | JComponent visualize() { |
7 | JComponent c = super.visualize(); |
8 | ret withCenteredButtons(c, |
9 | tableDependentButton_extraCondition(table, "Add Module", r { |
10 | S id = strOrNull(selectedTableCell(table, "ID")); |
11 | if (isSnippetID(id) && cic((S) selectedTableCell(table, "Type"), "(Dynamic Module)")) |
12 | dm_addDynamicModuleDialog2(id); |
13 | }, func -> bool { |
14 | cic((S) selectedTableCell(table, "Type"), "(Dynamic Module)") |
15 | })); |
16 | } |
17 | |
18 | void start { |
19 | ownTimer(doEvery(60.0, r actualUpdate)); |
20 | } |
21 | |
22 | void actualUpdate { temp enter(); actualCalc(); } |
23 | |
24 | L<Map> calc() { |
25 | ret data != null ? data : actualCalc(); |
26 | } |
27 | |
28 | L<Map> actualCalc() ctex { |
29 | time "Get Latest Snippets" { |
30 | L<Snippet> l = recentlyChangedSnippets(); |
31 | } |
32 | ret setFieldAndReturn(data := map(l, func(Snippet s) -> Map { |
33 | humanizeKeys(putKeysFirst(objectAsMap(s), "title", "id")) |
34 | })); |
35 | } |
36 | } |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016556 |
Snippet name: | Latest Changed Snippets [Dyn Module] |
Eternal ID of this version: | #1016556/11 |
Text MD5: | 6f60bc153f42f7fc23dcc74fcc653a37 |
Transpilation MD5: | 8dddd6db3c2e69ba2a631103013f69bb |
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-24 04:13:08 |
Source code size: | 1023 bytes / 36 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 523 / 21472 |
Version history: | 10 change(s) |
Referenced in: | [show references] |