Libraryless. Click here for Pure Java version (14431L/100K).
1 | !7 |
2 | |
3 | sclass ModuleList_OldStyle extends DynCalculatedList { |
4 | O getModule(S item) { |
5 | ret callCreator('getModuleByID, item); |
6 | } |
7 | |
8 | JComponent visualize() { |
9 | JList list = (JList) super.visualize(); |
10 | onDoubleClickOrEnter(list, voidfunc(fS s) { dm_showModule(getModule(s)) }); |
11 | ret listPopupMenuItemsThreaded(list, |
12 | //"Delete", voidfunc(fS s) { removeConcept(getModule(s)) }, |
13 | "Show", voidfunc(fS s) { dm_showModule(getModule(s)) }, |
14 | //"Hide", voidfunc(fS s) { hideModule(getModule(s)) } |
15 | ); |
16 | } |
17 | |
18 | L<S> calc() { |
19 | ret map(func(final O m) -> S { |
20 | (S) call(creator(), 'renderConcept, m) /* contains id as first int */ |
21 | }, modulesToList()); |
22 | } |
23 | |
24 | L<O> modulesToList() { ret dm_listStems(); } |
25 | } |
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016132 |
Snippet name: | Module List Old Style |
Eternal ID of this version: | #1016132/4 |
Text MD5: | bec297981f0e1914b993d7887454448e |
Transpilation MD5: | a303df59ca12cf2a8293af4066ce3aee |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-08 18:35:14 |
Source code size: | 755 bytes / 25 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 451 / 9302 |
Version history: | 3 change(s) |
Referenced in: | [show references] |