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

15
LINES

< > BotCompany Repo | #1009825 // showCommandList - show an inferred list of this bot's commands at side of console

JavaX fragment (include)

1  
static JList showCommandList() {
2  
  ret swingUnlessHeadless(func -> JList {
3  
    final JList list = jlist(knownCommands());
4  
    addToFrameSplitRight_aggressive(consoleFrame(),
5  
      withTitle("Commands", list), 0.7f);
6  
    onDoubleClick(list, r {
7  
      S s = getSelectedItem(list);
8  
      if (!javaTok(s).contains("*") /* && eq(s, consoleInput())*/)
9  
        consoleSend(s);
10  
      else
11  
        consoleSetInputAndFocus(s);
12  
    });
13  
    ret list;
14  
  });
15  
}

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: #1009825
Snippet name: showCommandList - show an inferred list of this bot's commands at side of console
Eternal ID of this version: #1009825/12
Text MD5: 8a6e8508cbfe7b88f8463046c3211f10
Author: stefan
Category: javax / gui / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-12-25 19:54:12
Source code size: 460 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 510 / 515
Version history: 11 change(s)
Referenced in: [show references]