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

29
LINES

< > BotCompany Repo | #1016095 // FullScreen Module [Put Stefan's OS in fullscreen]

JavaX source code (Dynamic Module) [tags: use-pretranspiled] - run with: Stefan's OS

Uses 911K of libraries. Click here for Pure Java version (6557L/35K).

1  
!7
2  
3  
cmodule FullScreen {
4  
  transient JButton btn;
5  
  
6  
  visual btn = jbutton("Full-Screen On/Off", r switchIt);
7  
8  
  void switchIt enter {
9  
    JDesktopPane desktop = dm_desktopPane();
10  
    if (desktop == null) ret;
11  
    Window w = getWindow(desktop);
12  
    if (!isFullScreen(desktop)) {
13  
      showFullScreen(frameTitle(desktop), desktop);
14  
      pcall { frameIcon((S) dm_getOS('mainIconID), desktop); }
15  
      cleanExitOnFrameClose_ifStillInSameFrame(desktop);
16  
    } else {
17  
      removeFromParent(desktop);
18  
      dm_callOS('showDesktop);
19  
    }
20  
    
21  
    // Allow closing empty "zombie" windows (why do we have these?)
22  
    final JFrame f = getFrame(desktop);
23  
    onFrameClosing(f, r {
24  
      if (isEmptyFrame(f)) disposeWindow(f);
25  
    });
26  
    
27  
    disposeWindow(w);
28  
  }
29  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 15 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, onxytkatvevr, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1016095
Snippet name: FullScreen Module [Put Stefan's OS in fullscreen]
Eternal ID of this version: #1016095/17
Text MD5: 9664e8a1818b779b1eefa3257e4654b4
Transpilation MD5: 769a1563f8a5c8b22077292c6cad6968
Author: stefan
Category: javax / gui
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-10 18:00:41
Source code size: 787 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 418 / 11951
Version history: 16 change(s)
Referenced in: [show references]