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