Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

16
LINES

< > BotCompany Repo | #1027350 // dm_showSuggestion

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (7006L/49K).

1  
// TODO: put window in user's preferred location
2  
static AutoCloseable dm_showSuggestion(S suggestion, Runnable action) {
3  
  O mod = dm_current_generic();
4  
  makeFrame_post.set(vf1_frameAutoRequestFocusFalse());
5  
  ret tempDisposeWindow(disposeWindowAfter(30.0, showPackedFrameInBottomRightCorner(
6  
    centerAndSouthWithMargins(jlabel(suggestion),
7  
      hgridWithSpacing(
8  
        jThreadedButton("OK", r {
9  
          temp dm_enter(mod);
10  
          disposeWindow(heldInstance(JButton));
11  
          callF(action);
12  
        }),
13  
        jCancelButton("No")
14  
      )
15  
  ))));
16  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027350
Snippet name: dm_showSuggestion
Eternal ID of this version: #1027350/5
Text MD5: 0d224cfa5dc4c5104a98f38af8f338c4
Transpilation MD5: fca1604ee7268cadaa780ecbdc75c3e7
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-03-11 12:03:04
Source code size: 577 bytes / 16 lines
Pitched / IR pitched: No / No
Views / Downloads: 183 / 262
Version history: 4 change(s)
Referenced in: [show references]