1 | static Runnable disableAllButtonsWhileCalcing(final Runnable r) { |
2 | ret r { |
3 | final JButton button = heldInstance(JButton); |
4 | L<JButton> buttons = childrenOfType(JButton, (Component) getPossiblyInternalFrame(button); |
5 | final L<JButton> enabledButtons = onlyEnabledComponents(buttons); |
6 | disableButtons(enabledButtons); |
7 | thread { |
8 | try { |
9 | callF(r); |
10 | } finally { |
11 | enableButtons(enabledButtons); |
12 | } |
13 | } |
14 | }; |
15 | } |
Began life as a copy of #1016417
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: | #1016443 |
Snippet name: | disableAllButtonsWhileCalcing |
Eternal ID of this version: | #1016443/4 |
Text MD5: | b0e15f1219e8de3a8dd83b5d4bf7c590 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-28 21:54:35 |
Source code size: | 461 bytes / 15 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 363 / 403 |
Version history: | 3 change(s) |
Referenced in: | [show references] |