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

23
LINES

< > BotCompany Repo | #1022717 // Variable for chat bot

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (3234L/16K).

1  
!7
2  
3  
cmodule Variable > DynBigNumber {
4  
  transient JLabel lblType;
5  
  
6  
  start { doPersist(); }
7  
  
8  
  void makeTexts() {
9  
    super.makeTexts();
10  
    setModuleName(nempty(description) ? "Variable " + quote(description) : "Unnamed Variable");
11  
  }
12  
  
13  
  bool setValue(O o) {
14  
    if (!super.setValue(o)) false;
15  
    ret true with setText(lblType, className(o));
16  
  }
17  
  
18  
  afterVisualize {
19  
    replaceComponent(label, func(Component label) -> Component {
20  
      centerAndSouthWithMargin(label, lblType = jRightAlignedLabel(className(value)))
21  
    });
22  
  }
23  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, cfunsshuasjs, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1022717
Snippet name: Variable for chat bot
Eternal ID of this version: #1022717/11
Text MD5: 1d7d70b9cd2a268730d667b7829d68d0
Transpilation MD5: 90f8fba3cd70337c2a76826c61dbb3cb
Author: stefan
Category: javax / a.i.
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-01 17:37:03
Source code size: 564 bytes / 23 lines
Pitched / IR pitched: No / No
Views / Downloads: 320 / 651
Version history: 10 change(s)
Referenced in: [show references]