Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

25
LINES

< > BotCompany Repo | #1016132 // Module List Old Style

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Libraryless. Click here for Pure Java version (14431L/100K).

!7

sclass ModuleList_OldStyle extends DynCalculatedList {
  O getModule(S item) {
    ret callCreator('getModuleByID, item);
  }

  JComponent visualize() {
    JList list = (JList) super.visualize();
    onDoubleClickOrEnter(list, voidfunc(fS s) { dm_showModule(getModule(s)) });
    ret listPopupMenuItemsThreaded(list,
      //"Delete", voidfunc(fS s) { removeConcept(getModule(s)) }, 
      "Show", voidfunc(fS s) { dm_showModule(getModule(s)) },
      //"Hide", voidfunc(fS s) { hideModule(getModule(s)) }
    );
  }

  L<S> calc() {
    ret map(func(final O m) -> S {
      (S) call(creator(), 'renderConcept, m) /* contains id as first int */
    }, modulesToList());
  }
  
  L<O> modulesToList() { ret dm_listStems(); }
}

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: 450 / 9301
Version history: 3 change(s)
Referenced in: #1016674 - Module List [Dyn Module]