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

13
LINES

< > BotCompany Repo | #1015186 // disposeWindowAfter_unlessMouseInIt

JavaX fragment (include)

1  
static void disposeWindowAfter_unlessMouseInIt(final double seconds, final Component c) {
2  
  if (seconds <= 0) ret;
3  
  thread "Dispose window" {
4  
    sleepSeconds(seconds);
5  
    while (mouseInWindow(c)) // TODO: check if other windows are on top
6  
      sleepSeconds(1);
7  
    disposeWindow(c);
8  
  }
9  
}
10  
11  
static void disposeWindowAfter_unlessMouseInIt(Component c, double seconds) {
12  
  disposeWindowAfter_unlessMouseInIt(seconds, c);
13  
}

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: #1015186
Snippet name: disposeWindowAfter_unlessMouseInIt
Eternal ID of this version: #1015186/4
Text MD5: 9daa4669f867962382a9920d07a4c904
Author: stefan
Category: javax / ocr
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2018-05-21 00:32:55
Source code size: 435 bytes / 13 lines
Pitched / IR pitched: No / No
Views / Downloads: 365 / 411
Version history: 3 change(s)
Referenced in: [show references]