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

50
LINES

< > BotCompany Repo | #1034945 // G22AnalyzersPanel backup

JavaX fragment (include)

1  
sclass G22AnalyzersPanel {
2  
  replace Script with G22Analyzer.
3  
  replace IDE with G22AnalyzerIDE.
4  
  
5  
  transient settable G22Utils g22utils;
6  
7  
  *(G22Utils *g22utils) {}
8  
 
9  
  transient SimpleCRUD_v2<Script> scriptCRUD;
10  
  transient SingleComponentPanel scpIDE;
11  
  transient IDE scriptIDE;
12  
  
13  
  cachedVisualize {
14  
    scriptCRUD = new SimpleCRUD_v2<>(g22utils.concepts(), Script);
15  
    scriptCRUD.entityName = -> "Analyzer";
16  
    g22utils.setupScriptCRUD(scriptCRUD);
17  
    
18  
    scpIDE = singleComponentPanel();
19  
20  
    var scriptCRUDVis = scriptCRUD.visualize();
21  
22  
    scriptCRUD.onSelectionChanged(-> {
23  
      scriptIDE = new IDE(g22utils);
24  
      var script = scriptCRUD.selected();
25  
      scriptIDE.setScript(script);
26  
      scpIDE.set(jCenteredRaisedSection(str(script),
27  
        scriptIDE));
28  
    });
29  
30  
    ret jvsplit(
31  
      jCenteredSection("Analyzers", scriptCRUDVis),
32  
      scpIDE);
33  
  }
34  
  
35  
  void updateCount {
36  
    scriptCRUD.update();
37  
  }
38  
  
39  
  void edit(Script script) {
40  
    scriptCRUD.setSelected(script);
41  
  }
42  
    
43  
  void setSelected(Script script) {
44  
    scriptCRUD.setSelected(script);
45  
  }
46  
  
47  
  void selectAfterUpdate(Script script) {
48  
    scriptCRUD.selectAfterUpdate(script);
49  
  }
50  
}

Author comment

Began life as a copy of #1034473

download  show line numbers  debug dex  old transpilations   

Travelled to 3 computer(s): bhatertpkbcr, mowyntqkapby, mqqgnosmbjvj

No comments. add comment

Snippet ID: #1034945
Snippet name: G22AnalyzersPanel backup
Eternal ID of this version: #1034945/1
Text MD5: 44ba6e6cc800be3fb25ea77dcd0af526
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2022-03-17 18:01:13
Source code size: 1222 bytes / 50 lines
Pitched / IR pitched: No / No
Views / Downloads: 138 / 143
Referenced in: [show references]