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

40
LINES

< > BotCompany Repo | #1030774 // DynBEAReactor_textInOut

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (27631L/191K).

1  
beaConcept BInput {
2  
  S text;
3  
  
4  
  toString { ret "[\*id*/] Input " + quote(text); }
5  
}
6  
7  
beaConcept BOutput {
8  
  S text;
9  
  
10  
  toString { ret "[\*id*/] Output " + quote(text); }
11  
}
12  
13  
asclass DynBEAReactor_textInOut > DynBEAReactor {
14  
  S input, output;
15  
  
16  
  transient JPanel inputButtons;
17  
18  
  visual
19  
    jvsplit(0.2, jhsplit(jCenteredSection("Input",
20  
      centerAndSouth(dm_wordWrapTextArea input(), withMargin(inputButtons = jRightAlignedButtons(
21  
        "Load input", rThreadEnter loadInput,
22  
        "Load & process", rThreadEnter loadAndProcess)))),
23  
      dm_wordWrapTextAreaAsSection output()),
24  
      super);
25  
26  
27  
  @Override bool hasOutput() { ret hasConcept(BOutput); }
28  
  
29  
  void loadInput {
30  
    setField(output := "");
31  
    deleteReactors();
32  
    deleteConcepts(BInput);
33  
    uniq BInput(text := input);
34  
  }
35  
  
36  
  void loadAndProcess {
37  
    loadInput();
38  
    reactUntilOutput();
39  
  }
40  
}

Author comment

Began life as a copy of #1030762

download  show line numbers  debug dex  old transpilations   

Travelled to 4 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, vouqrxazstgt

No comments. add comment

Snippet ID: #1030774
Snippet name: DynBEAReactor_textInOut
Eternal ID of this version: #1030774/12
Text MD5: 9e73f9acbe6ced92414d90a1c04b9693
Transpilation MD5: c3db599974077be63ea155e59ddb9c90
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-31 15:42:08
Source code size: 915 bytes / 40 lines
Pitched / IR pitched: No / No
Views / Downloads: 203 / 400
Version history: 11 change(s)
Referenced in: [show references]