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

24
LINES

< > BotCompany Repo | #1016385 - DynSingleFunction

JavaX fragment (include)

static abstract class DynSingleFunction extends DynModule {
  transient S buttonText;
  
  *() {}
  *(S *buttonText) {}
  
  // call before visualize
  void setFunctionName(S name) { buttonText = name; }
  
  visualize {
    ret jfullcenter(withMargin(makeButtons()));
  }
  
  JComponent makeButtons() {
    ret jbutton(or2(buttonText, dm_moduleName()), rThread doItWithEnter);
  }
  
  abstract void doIt();
  
  void doItWithEnter() {
    temp enter();
    doIt();
  }
}

download  show line numbers  debug dex   

Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1016385
Snippet name: DynSingleFunction
Eternal ID of this version: #1016385/10
Text MD5: 46d1fb8fda14f58d443a313d6f921841
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-17 17:00:07
Source code size: 496 bytes / 24 lines
Pitched / IR pitched: No / No
Views / Downloads: 204 / 671
Version history: 9 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1016385 & http://1016385.tinybrain.de