Transpiled version (61364L) is out of date.
1 | srecord noeq G22ProjectOverviewPanel(G22Utils g22utils) { |
2 | JSyntaxTextFileEditor storyView; |
3 | JLabel lblStats; |
4 | transient G22ShowCasePanel showCasePanel; |
5 | |
6 | void updateStats { |
7 | setText(lblStats, "Database core size: " + str_toKB(fileSize(g22utils.concepts().conceptsFile()))); |
8 | } |
9 | |
10 | cachedVisualize { |
11 | var conceptsFile = g22utils.concepts().conceptsFile(); |
12 | lblStats = rightAlignedLabel(); |
13 | |
14 | IVF1<File> fileListener = file -> { |
15 | if (sameFile(file, conceptsFile)) |
16 | updateStats(); |
17 | }; |
18 | |
19 | bindToComponent(lblStats, -> { |
20 | g22utils.onProjectFileChanged(fileListener); |
21 | updateStats(); |
22 | }, -> g22utils.removeProjectFileChangedListener(fileListener)); |
23 | |
24 | storyView = new JSyntaxTextFileEditor(g22utils.projectStoryTextFile()) |
25 | .uneditable(true); |
26 | g22utils.adaptTextEditor(storyView); |
27 | |
28 | addInFront(storyView.buttons(), |
29 | jImageButtonScaledToWidth(16, #1103068, "Edit", rThread { |
30 | //g22utils.projectActions.editProjectStory(); |
31 | storyView.uneditable(false); |
32 | })); |
33 | |
34 | showCasePanel = new G22ShowCasePanel(g22utils); |
35 | |
36 | // LAYOUT |
37 | |
38 | S title = "Project " + quote(g22utils.projectName()) + " Overview"; |
39 | |
40 | G22VariablesPanel variablesPanel = g22utils.makeVariablesPanel(); |
41 | variablesPanel.crud().tableSearcher().scpRightOfSearchPanel.set(withLeftMargin( |
42 | toolTip("Maximize variables panel", jimageButtonScaledToWidth(16, #1103161, rThread { |
43 | g22utils.showUIURL("Variables") |
44 | })))); |
45 | |
46 | ret withTopAndBottomMargin(jRaisedCenteredSection(title, |
47 | jvsplit_minZero( |
48 | jhsplit(0.75, |
49 | jCenteredSection("Project Story", |
50 | centerAndSouthWithMargin( |
51 | storyView, |
52 | centerAndEastWithMargin(lblStats, jFilePathButton(conceptsFile)) |
53 | )), |
54 | northAndCenterWithMargin( |
55 | new G22AutoStartPanel(g22utils), |
56 | variablesPanel.compactView(false) |
57 | )), |
58 | jCenteredSection("Showcase", showCasePanel.visualize()) |
59 | ) // end of jvsplit |
60 | )); |
61 | } |
62 | } |
Began life as a copy of #1034688
download show line numbers debug dex old transpilations
Travelled to 5 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj, wnsclhtenguj
No comments. add comment
Snippet ID: | #1034718 |
Snippet name: | G22ProjectOverviewPanel (shows story, auto start status, variables) |
Eternal ID of this version: | #1034718/53 |
Text MD5: | 059d65046a2968516c8f999af1df4482 |
Author: | stefan |
Category: | javax / gazelle 22 |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2023-04-27 18:46:36 |
Source code size: | 2127 bytes / 62 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 278 / 605 |
Version history: | 52 change(s) |
Referenced in: | [show references] |