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

25
LINES

< > BotCompany Repo | #1016112 // General Keyword List [Dyn Module]

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

Libraryless. Click here for Pure Java version (14777L/106K).

1  
!7
2  
3  
sclass GeneralKeywordList extends DynCalculatedList {
4  
  Set<S> set = new HashSet;
5  
  
6  
  bool warnOnDelete() { ret nempty(set); }
7  
  
8  
  JComponent visualize() {
9  
    ret centerAndSouthWithMargins(jSection("KEYWORDS", super.visualize()),
10  
      jcenteredbuttons("Add a keyword...", r {
11  
        inputText("Add keyword", voidfunc(S s) {
12  
          lock lock;
13  
          s = trim(s);
14  
          if (add(set, s))
15  
            appendToLocalMechLog("General keywords", s);
16  
          print("Set: " + set + ", list: " + list);
17  
          change(); updateMe();
18  
        });
19  
      }));
20  
  }
21  
  
22  
  L<S> calc() {
23  
    ret sortedIC(set);
24  
  }
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: #1016112
Snippet name: General Keyword List [Dyn Module]
Eternal ID of this version: #1016112/11
Text MD5: ba2de9645bb91e815654c295450bb747
Transpilation MD5: a7be9191d0297babe1ec6e223b647b06
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-06-08 18:40:44
Source code size: 643 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 458 / 9609
Version history: 10 change(s)
Referenced in: [show references]