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

26
LINES

< > BotCompany Repo | #1013762 // showWebsBesideConsole - show Robo thoughts

JavaX fragment (include)

1  
static void showWebsBesideConsole() {
2  
  showWebsBesideConsole(0.7f);
3  
}
4  
5  
static void showWebsBesideConsole(final float splitRatio) {
6  
  swingUnlessHeadless(r {
7  
    final JList list = jlist();
8  
    final Runnable update = r {
9  
      fillListWithStrings(list, renderTriplesWithDate(ai_allTriplesByDate()))
10  
    };
11  
    callF(update);
12  
    ai_onNewWeb(update);
13  
    listPopupMenuItem(list, "Forget", voidfunc(S item) {
14  
      ai_silentlyInvalidateAndDeleteTriple(ai_findTriple(ai_parseTriple(dropLeadingDate(item))));
15  
      callF(update);
16  
    });
17  
    Runnable forgetAll = r {
18  
      ai_deleteWebsMadeByProgram(ai_programID());
19  
      ai_clearTripleIndex();
20  
      callF(update);
21  
    };
22  
    addToFrameSplitRight_aggressive(consoleFrame(),
23  
      withTitle("Thoughts:",
24  
        centerAndSouth(list, jcenteredbutton("Forget all", forgetAll))), splitRatio);
25  
  });
26  
}

Author comment

Began life as a copy of #1009825

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: #1013762
Snippet name: showWebsBesideConsole - show Robo thoughts
Eternal ID of this version: #1013762/15
Text MD5: 53dc1d958441c8ba53ce66ecf0caff49
Author: stefan
Category: javax / gui / talking robots
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-02-27 12:54:54
Source code size: 870 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 265 / 297
Version history: 14 change(s)
Referenced in: [show references]