Transpiled version (9388L) is out of date.
static JCheckBoxMenuItem jMenuItemStayCheckedOnClick(S text, IF0<Bool> checked, Runnable action) { var mi = swing(-> new JCheckBoxMenuItem(text, isTrue(checked!))); bindToComponent(mi, r { bool b = isTrue(checked!); setChecked(mi, b); }); addActionListener(mi, -> { if (!isChecked(mi)) setChecked(mi, true); callF(action); }); ret mi; }
Began life as a copy of #1035497
download show line numbers debug dex old transpilations
Travelled to 2 computer(s): mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1035498 |
| Snippet name: | jMenuItemStayCheckedOnClick |
| Eternal ID of this version: | #1035498/3 |
| Text MD5: | 6f3c47cccaa84692f06abbf3c76bb8c6 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2022-05-30 16:12:20 |
| Source code size: | 387 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 358 / 463 |
| Version history: | 2 change(s) |
| Referenced in: | [show references] |