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

24
LINES

< > BotCompany Repo | #1010050 // showTabbedWebs

JavaX fragment (include)

1  
static JTabbedPane showTabbedWebs(L params) {
2  
  ret showTabbedWebs(toObjectArray(params));
3  
}
4  
5  
// params: title, web, title, web, ...
6  
// or: web, web, web, ...
7  
static JTabbedPane showTabbedWebs(fO... params) {
8  
  ret swing(func -> JTabbedPane {
9  
    new L out;
10  
    int n = 0;
11  
    for (O o : params) {
12  
      Web web = castOpt(o, Web);
13  
      if (web == null) { out.add(o); continue; }
14  
      ++n;
15  
      CirclesAndLines cal = webToCAL(web);
16  
      Canvas canvas = cal.makeCanvas();
17  
      if (!isString(last(out)))
18  
        out.add(or2(cal.title, "Web " + n));
19  
      out.add(calAutoLayout2(cal, canvas));
20  
    }
21  
    //print("Tabs: " + map className(params) + " -> " + map className(out));
22  
    ret showTabs(toObjectArray(out));
23  
  });
24  
}

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: #1010050
Snippet name: showTabbedWebs
Eternal ID of this version: #1010050/12
Text MD5: b1e945ac6ec6b89895d652435be0ce37
Author: stefan
Category: javax / a.i. / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-09-07 17:36:38
Source code size: 746 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 553 / 566
Version history: 11 change(s)
Referenced in: [show references]