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

11
LINES

< > BotCompany Repo | #1024934 // boolFieldMenuItem

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

Libraryless. Click here for Pure Java version (2496L/16K).

1  
static JCheckBoxMenuItem boolFieldMenuItem(O o, S field) {
2  
  ret boolFieldMenuItem(o, field, null);
3  
}
4  
5  
static JCheckBoxMenuItem boolFieldMenuItem(O o, S field, Runnable onSet) {
6  
  S humanized = humanizeFormLabel(field);
7  
  ret jCheckBoxMenuItem(humanized, isTrue(getOpt(o, field)), voidfunc(bool b) {
8  
    set(o, field, b);
9  
    callF(onSet);
10  
  });
11  
}

Author comment

Began life as a copy of #1019442

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: #1024934
Snippet name: boolFieldMenuItem
Eternal ID of this version: #1024934/5
Text MD5: b20874fe13b270f5eca122ffa14ec778
Transpilation MD5: 9fc0d94f978f42040c8e773164b356c0
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 02:59:16
Source code size: 357 bytes / 11 lines
Pitched / IR pitched: No / No
Views / Downloads: 256 / 344
Version history: 4 change(s)
Referenced in: [show references]