static AutoCloseable tempEnableButton(final JButton b) { if (b == null) null; bool wasEnabled = swing(func -> bool { bool wasEnabled = isEnabled(b); if (!wasEnabled) enableButton(b); ret wasEnabled; }); if (wasEnabled) null; ret autocloseable { disableButton(b); }; }
Began life as a copy of #1016305
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1017187 |
Snippet name: | tempEnableButton |
Eternal ID of this version: | #1017187/1 |
Text MD5: | ed0b47f2703c708518d8be31baec54ef |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-07-13 18:08:04 |
Source code size: | 305 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 362 / 384 |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |