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 795K of libraries. Click here for Pure Java version (7070L/37K).

!7

cmodule LockScreenWithCPU > DynFullscreen {
  switchable bool withConfirm; // to filter out accidental clicks
  transient JLabel label;
  
  start {
    dm_require("#1026796/CombinedCPUTrayIcon");
    dm_vmBus_onMessage_q newCombinedCPUTrayImage(voidfunc(O mod, BufferedImage image) {
      setImage(label, image);
    });
  }
  
  visual jbutton("Lock Screen", rThread goFullscreen);
  
  JComponent fullscreenVisualize() {
    ret jfullcenter(
      centerAndSouthWithMargins(
        label = jcenteredlabel("Lock mode!"),
        jMarginButton(20, "Exit", rThread exitStep2)));
  }
  
  void exitStep2 enter {
    /*if (!withConfirm) TODO */
    exitFullscreen();
  }
}

Author comment

Began life as a copy of #1027029

download  show line numbers  debug dex   

Travelled to 1 computer(s): mqqgnosmbjvj

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: 14 / 309
Version history: 5 change(s)
Referenced in: [show references]

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