static AutoCloseable tempDisableButton(final JButton b) { if (b == null) null; bool wasEnabled = swing(func -> bool { bool wasEnabled = isEnabled(b); if (wasEnabled) disableButton(b); ret wasEnabled; }); if (!wasEnabled) null; ret autocloseable { enableButton(b); }; }
Began life as a copy of #1009388
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: | #1016305 |
Snippet name: | tempDisableButton |
Eternal ID of this version: | #1016305/6 |
Text MD5: | 28ec3b6b1f680808312f8af2484bedcd |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-14 10:54:01 |
Source code size: | 306 bytes / 11 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 458 / 512 |
Version history: | 5 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1016420 - tempDisableAndRenameButton #1016421 - tempRenameButton #1017187 - tempEnableButton |