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

26
LINES

< > BotCompany Repo | #1027028 - Lock Screen

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

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

!7

cmodule LockScreen > DynSingleFunction {
  switchable bool withConfirm; // to filter out accidental clicks
  transient JFrame frame;
  
  void doIt { showFullscreen(); }
  
  void showFullscreen enter {
    if (frame != null) activateFrame(frame);
    frame = showFullScreen(jfullcenter(
      centerAndSouthWithMargins(
        jcenteredlabel("Lock mode!"),
        jMarginButton(20, "Exit", rThread exitStep2))));
    onFrameClose(frame, r { frame = null; });
  }
  
  void exitFullscreen enter {
    disposeFrame(frame);
  }
  
  void exitStep2 enter {
    /*if (!withConfirm) TODO */
    exitFullscreen();
  }
}

Author comment

Began life as a copy of #1027023

download  show line numbers  debug dex   

Travelled to 5 computer(s): bhatertpkbcr, mqqgnosmbjvj, pzhvpgtvlbxg, tvejysmllsmz, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027028
Snippet name: Lock Screen
Eternal ID of this version: #1027028/6
Text MD5: 3edf37b96178ae5654ad744ab880aa09
Transpilation MD5: 716450e663b9e716ef95da2c32f66d7e
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-11 14:32:17
Source code size: 644 bytes / 26 lines
Pitched / IR pitched: No / No
Views / Downloads: 31 / 96
Version history: 5 change(s)
Referenced in: [show references]

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