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).

!7

cmodule FullScreen {
  transient JButton btn;
  
  visual btn = jbutton("Full-Screen On/Off", r switchIt);

  void switchIt enter {
    JDesktopPane desktop = dm_desktopPane();
    if (desktop == null) ret;
    Window w = getWindow(desktop);
    if (!isFullScreen(desktop)) {
      showFullScreen(frameTitle(desktop), desktop);
      pcall { frameIcon((S) dm_getOS('mainIconID), desktop); }
      cleanExitOnFrameClose_ifStillInSameFrame(desktop);
    } else {
      removeFromParent(desktop);
      dm_callOS('showDesktop);
    }
    
    // Allow closing empty "zombie" windows (why do we have these?)
    final JFrame f = getFrame(desktop);
    onFrameClosing(f, r {
      if (isEmptyFrame(f)) disposeWindow(f);
    });
    
    disposeWindow(w);
  }
}

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: 315 / 11831
Version history: 16 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1016095 & http://1016095.tinybrain.de