Uses 911K of libraries. Click here for Pure Java version (8380L/44K).
1 | !7 |
2 | |
3 | sclass Tab { S name; } |
4 | |
5 | compact module Tabs { |
6 | new L<Tab> tabs_actual; |
7 | transient L<Tab> tabs; |
8 | transient JTabbedPane jtabs; |
9 | |
10 | start { tabs = notifyingList(tabs_actual, r change + r updateTabs); } |
11 | |
12 | visualize { |
13 | jtabs = jtabs(); updateTabs(); |
14 | ret withButtonsAbove(jtabs, "+", rThread { inputText("Name for new tab", vf<S> addTab) }); |
15 | } |
16 | |
17 | void updateTabs q { fillJTabs(jtabs, syncCollect name(tabs)); } |
18 | |
19 | // API |
20 | |
21 | void addTab(S name) { tabs.add(nu(Tab, +name)); } |
22 | } |
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020847 |
Snippet name: | Tabs |
Eternal ID of this version: | #1020847/22 |
Text MD5: | 4c0b4f654556675b91de841a358fa8ee |
Transpilation MD5: | 21b75751f1fd940a6fe7e9929a7225b1 |
Author: | stefan |
Category: | |
Type: | JavaX source code (Dynamic Module) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-01-06 02:10:34 |
Source code size: | 514 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 348 / 725 |
Version history: | 21 change(s) |
Referenced in: | [show references] |