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).

!7

sclass GeneralKeywordList extends DynCalculatedList {
  Set<S> set = new HashSet;
  
  bool warnOnDelete() { ret nempty(set); }
  
  JComponent visualize() {
    ret centerAndSouthWithMargins(jSection("KEYWORDS", super.visualize()),
      jcenteredbuttons("Add a keyword...", r {
        inputText("Add keyword", voidfunc(S s) {
          lock lock;
          s = trim(s);
          if (add(set, s))
            appendToLocalMechLog("General keywords", s);
          print("Set: " + set + ", list: " + list);
          change(); updateMe();
        });
      }));
  }
  
  L<S> calc() {
    ret sortedIC(set);
  }
}

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: 456 / 9605
Version history: 10 change(s)
Referenced in: [show references]