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

11
LINES

< > BotCompany Repo | #1024939 // intFieldMenuItem

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

Libraryless. Click here for Pure Java version (7558L/53K).

static JMenuItem intFieldMenuItem(O o, S field, O... _) {
  S humanized = humanizeFormLabel(field);
  ret jMenuItem(humanizeFormLabel(field) + "...", r {
    final JTextField tf = jtextfield(get(o, field));
    showFormTitled(or2(stringOptPar(_, 'formTitle), "Set " + humanized),
      humanized + ":", tf, r {
        set(o, field, parseInt(gtt(tf)));
        callF(optPar onSet(_));
      });
  });
}

Author comment

Began life as a copy of #1024934

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1024939
Snippet name: intFieldMenuItem
Eternal ID of this version: #1024939/3
Text MD5: 1467e2050db19b81d1dbd1934d44c253
Transpilation MD5: 9c2bc1425168b128c3a7a69dbbe70737
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-08-31 03:32:51
Source code size: 412 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 138 / 198
Version history: 2 change(s)
Referenced in: [show references]