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

34
LINES

< > BotCompany Repo | #1016107 // Module Library [Dyn Module]

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

Libraryless. Click here for Pure Java version (18017L/131K).

1  
!7
2  
3  
sclass ModuleLibrary extends DynSCP {
4  
  L<S> list;
5  
  S mechListName = "Modules that should work";
6  
7  
  transient DynamicVStack buttons;
8  
  transient ButtonIconLoader iconLoader;
9  
  
10  
  start { dm_useLocalMechListCopies(); }
11  
12  
  JComponent visualize2() {
13  
    if (buttons == null) { buttons = verticalNiceButtons(); updateButtons(); }
14  
    if (iconLoader == null) iconLoader = new ButtonIconLoader(buttons);
15  
    update();
16  
    ret jWiderScrollPane(jfullcenter(buttons));
17  
  }
18  
  
19  
  void update {
20  
    if (setField(list := mL(mechListName)))
21  
      updateButtons();
22  
  }
23  
  
24  
  void updateButtons {
25  
    L<TextImageAction> l = moduleLibraryForNiceButtons(list, voidfunc(fS moduleID) {
26  
      thread {
27  
        //infoBox("Making module: " + moduleID);
28  
        dm_makeOrShowModule(moduleID);
29  
      }
30  
    });
31  
    replaceNiceButtons(buttons, l);
32  
    if (iconLoader != null) iconLoader.update();
33  
  }
34  
}

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: #1016107
Snippet name: Module Library [Dyn Module]
Eternal ID of this version: #1016107/15
Text MD5: 2d65f22bdf9cf9d83f159b9c31b096c0
Transpilation MD5: 3480bd26cb26ddec3c6d18e08c82cd67
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-10-23 13:28:15
Source code size: 912 bytes / 34 lines
Pitched / IR pitched: No / No
Views / Downloads: 482 / 19633
Version history: 14 change(s)
Referenced in: [show references]