1 | static JLabel showSuggestion_current; |
2 | sbool showSuggestion_keyListenerInstalled; |
3 | |
4 | // action is called in new thread |
5 | static JLabel showSuggestion_master(fS suggestionText, fO action) {
|
6 | hideSuggestion(); |
7 | ret showSuggestion_makeMaster(showSuggestion_individual(suggestionText, action)); |
8 | } |
9 | |
10 | static JLabel showSuggestion_makeMaster(JLabel label) {
|
11 | JButton btnOK = firstButton(getWindow(label)); |
12 | setText(btnOK, getText(btnOK) + appendBracketed(hotKey_teach()); |
13 | showSuggestion_current = label; |
14 | showSuggestion_installHotkey(); |
15 | ret label; |
16 | } |
17 | |
18 | svoid showSuggestion_installHotkey {
|
19 | if (showSuggestion_keyListenerInstalled) ret; |
20 | showSuggestion_keyListenerInstalled = true; |
21 | onGlobalHotKey(hotKey_teach(), r-awt {
|
22 | bool b = isComponentShowing(showSuggestion_current); |
23 | print("hotkey: " + b);
|
24 | if (b) |
25 | clickFirstButton(getWindow(showSuggestion_current)); |
26 | }); |
27 | } |
Began life as a copy of #1015586
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1015640 |
| Snippet name: | showSuggestion_master - shows only one suggestion at a time |
| Eternal ID of this version: | #1015640/5 |
| Text MD5: | d7ca5365b43c9b6ae91d4abf53315ebb |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-05-21 00:55:11 |
| Source code size: | 906 bytes / 27 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 603 / 645 |
| Version history: | 4 change(s) |
| Referenced in: | [show references] |