1 | static AutoCloseable tempEnableButton(final JButton b) { |
2 | if (b == null) null; |
3 | bool wasEnabled = swing(func -> bool { |
4 | bool wasEnabled = isEnabled(b); |
5 | if (!wasEnabled) |
6 | enableButton(b); |
7 | ret wasEnabled; |
8 | }); |
9 | if (wasEnabled) null; |
10 | ret autocloseable { disableButton(b); }; |
11 | } |
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: | 363 / 385 |
Referenced in: | [show references] |