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).

static JCheckBoxMenuItem boolFieldMenuItem(O o, S field) {
  ret boolFieldMenuItem(o, field, null);
}

static JCheckBoxMenuItem boolFieldMenuItem(O o, S field, Runnable onSet) {
  S humanized = humanizeFormLabel(field);
  ret jCheckBoxMenuItem(humanized, isTrue(getOpt(o, field)), voidfunc(bool b) {
    set(o, field, b);
    callF(onSet);
  });
}

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: 185 / 255
Version history: 4 change(s)
Referenced in: [show references]