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

27
LINES

< > BotCompany Repo | #1027031 - Lock Screen with CPU meter [shortened]

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

Uses 843K of libraries. Click here for Pure Java version (7070L/37K).

1  
!7
2  
3  
cmodule LockScreenWithCPU > DynFullscreen {
4  
  switchable bool withConfirm; // to filter out accidental clicks
5  
  transient JLabel label;
6  
  
7  
  start {
8  
    dm_require("#1026796/CombinedCPUTrayIcon");
9  
    dm_vmBus_onMessage_q newCombinedCPUTrayImage(voidfunc(O mod, BufferedImage image) {
10  
      setImage(label, image);
11  
    });
12  
  }
13  
  
14  
  visual jbutton("Lock Screen", rThread goFullscreen);
15  
  
16  
  JComponent fullscreenVisualize() {
17  
    ret jfullcenter(
18  
      centerAndSouthWithMargins(
19  
        label = jcenteredlabel("Lock mode!"),
20  
        jMarginButton(20, "Exit", rThread exitStep2)));
21  
  }
22  
  
23  
  void exitStep2 enter {
24  
    /*if (!withConfirm) TODO */
25  
    exitFullscreen();
26  
  }
27  
}

Author comment

Began life as a copy of #1027029

download  show line numbers  debug dex   

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

No comments. add comment

Snippet ID: #1027031
Snippet name: Lock Screen with CPU meter [shortened]
Eternal ID of this version: #1027031/6
Text MD5: d36c7e033df6d1a2722f437bb926d5b9
Transpilation MD5: ee7326867e3426596d8aa0d593e6718e
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 18:41:51
Source code size: 702 bytes / 27 lines
Pitched / IR pitched: No / No
Views / Downloads: 35 / 403
Version history: 5 change(s)
Referenced in: [show references]

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