1 | static double showSuggestion_hideTime = 3.0; |
2 | |
3 | // action is called in new thread |
4 | static JLabel showSuggestion_individual(fS suggestionText, fO action) { |
5 | final int fontSize = 20, buttonFontSize = 15; |
6 | final JLabel label = fontSize(fontSize, jCenteredMultiLineLabel(suggestionText)); |
7 | final VF1<JFrame> framePost = getThreadLocal(makeFrame_post); |
8 | swing { |
9 | makeFrame_post.set(or(framePost, vf1_frameAutoRequestFocusFalse())); |
10 | JFrame f = alwaysOnTop(showPackedFrameInBottomRightCorner( |
11 | withLineBorder(Color.black, withMargin( |
12 | centerAndSouth( |
13 | label, |
14 | withTopMargin(makeFirstButtonBold(fontSizeAll(buttonFontSize, jcenteredbuttons( |
15 | "OK", r { |
16 | hideSuggestion(label); |
17 | callFInNewThread(action); |
18 | }, "No", r { hideSuggestion(label) }))))))))); |
19 | disposeWindowAfter_unlessMouseInIt(f, showSuggestion_hideTime); |
20 | } |
21 | ret label; |
22 | } |
Began life as a copy of #1015640
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: | #1015641 |
Snippet name: | showSuggestion_individual |
Eternal ID of this version: | #1015641/3 |
Text MD5: | 0d4f6d242e18fc48fb61ffea3902c3de |
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:32:34 |
Source code size: | 936 bytes / 22 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 352 / 390 |
Version history: | 2 change(s) |
Referenced in: | [show references] |