Uses 1485K of libraries. Click here for Pure Java version (34366L/225K).
1 | sclass G22LAScriptIDE<A extends G22LAScript> { |
2 | settable G22Utils g22utils; |
3 | settable S noScriptSelectedMsg = "Please select or create a script to edit it"; |
4 | |
5 | A script; |
6 | |
7 | SingleComponentPanel scp; |
8 | JLeftArrowScriptIDE ide; |
9 | |
10 | *(G22Utils *g22utils) {} |
11 | |
12 | visualize { |
13 | if (scp == null) scp = singleComponentPanel(); |
14 | loadScript(script); |
15 | ret scp; |
16 | } |
17 | |
18 | void setScript(A script) { |
19 | if (this.script != script) |
20 | loadScript(script); |
21 | } |
22 | |
23 | void loadScript(A script) { |
24 | this.script = script; |
25 | if (scp == null) ret; |
26 | if (script == null) |
27 | scp.set(jcenteredlabel(noScriptSelectedMsg())); |
28 | else { |
29 | ide = g22utils.leftArrowIDE(); |
30 | modifyIDE(ide); |
31 | ide.lvScript(varWithNotifyToLiveValue(S.class, script.varEditingText())); |
32 | scp.set(wrapIDE(ide)); |
33 | } |
34 | } |
35 | |
36 | swappable JComponent wrapIDE(JLeftArrowScriptIDE ide) { |
37 | ret ide.visualize(); |
38 | } |
39 | |
40 | event settingUpIDE(JLeftArrowScriptIDE ide); |
41 | |
42 | swappable void modifyIDE(JLeftArrowScriptIDE ide) { |
43 | ide.showTitle(false); |
44 | settingUpIDE(ide); |
45 | } |
46 | } |
Began life as a copy of #1034345
download show line numbers debug dex old transpilations
Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
Snippet ID: | #1034478 |
Snippet name: | G22LAScriptIDE - IDE for a G22LAScript [backup pefore tripartition] |
Eternal ID of this version: | #1034478/2 |
Text MD5: | 21914b171c603ee44c2fed72270c18ce |
Transpilation MD5: | ab3eb281d45658da990edc10d9686144 |
Author: | stefan |
Category: | javax / gazelle 22 |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-02-08 05:25:16 |
Source code size: | 1112 bytes / 46 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 131 / 195 |
Version history: | 1 change(s) |
Referenced in: | [show references] |