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

29
LINES

< > BotCompany Repo | #1027032 // Finger Type Mode [dev.]

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

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

1  
!7
2  
3  
cmodule FingerTypeMode > DynFullscreen {
4  
  S text;
5  
  
6  
  visual withMargin(withCenteredButtons(dm_textFieldWithLabel text(),
7  
    "Go fullscreen", rThread goFullscreen));
8  
  
9  
  JComponent fullscreenVisualize() {
10  
    new L<JButton> buttons;
11  
    int nButtons = 12;
12  
    buttons.add(jbutton("Exit", rThread exitFullscreen));
13  
    buttons.add(jbutton("SPACE", rThread { type(" ") }));
14  
    S chars = "abcdefghijklmnopqrstuvwxyz";
15  
    for (S s : stringChunks(chars, ratio_iceil(l(chars), nButtons-l(buttons)))) {
16  
      buttons.add(jbutton(upper(s), rThread {
17  
        setFullscreenComponent(withCenteredButtons(jcenteredlabel("Screen 2"),
18  
          "Back", rThread defaultScreen));
19  
      }));
20  
    }
21  
    ret northAndCenterWithMargins(
22  
      fontSizePlus(4, dm_centeredTextField text()),
23  
      hvgrid(chunks(4, buttons), 5);
24  
  }
25  
  
26  
  void type(S s) {
27  
    setField(text := unnull(text)+unnull(s));
28  
  }
29  
}

Author comment

Began life as a copy of #1027031

download  show line numbers  debug dex  old transpilations   

Travelled to 7 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1027032
Snippet name: Finger Type Mode [dev.]
Eternal ID of this version: #1027032/12
Text MD5: 4cf81166972b91b2279b3c471ce2b996
Transpilation MD5: 4923f06943d380b7bd2c0930979d3884
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 19:33:35
Source code size: 920 bytes / 29 lines
Pitched / IR pitched: No / No
Views / Downloads: 195 / 1029
Version history: 11 change(s)
Referenced in: [show references]