1 | // if f returns true, form is hidden |
2 | static void disableButtonWhileCalcing2(final O /*F0<Bool>*/ f) {
|
3 | final JButton button = heldInstance(JButton); |
4 | disableButton(button); |
5 | thread {
|
6 | try {
|
7 | bool ok = isTrue(callF(f)); |
8 | if (ok) disposePossiblyInternalFrame(button); |
9 | } finally {
|
10 | enableButton(button); |
11 | } |
12 | } |
13 | } |
Began life as a copy of #1015736
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: | #1015872 |
| Snippet name: | disableButtonWhileCalcing2 - for button actions |
| Eternal ID of this version: | #1015872/4 |
| Text MD5: | c6a7b6d7f4d43e0a3e928cc9b04f92b3 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-06-18 13:25:51 |
| Source code size: | 349 bytes / 13 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 600 / 661 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |