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

15
LINES

< > BotCompany Repo | #1022998 // Screen-Filling Text [OK, just a little slow]

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

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

1  
!7
2  
3  
cmodule ScreenFillingText {
4  
  S text = "TEST";
5  
  float fontSize;
6  
  
7  
  transient JTextPane textPane;
8  
  transient ReliableSingleThread rstAdjust = dm_rst(this, r {
9  
    jTextPane_adjustTextSizeToFillParentHeight_wait(textPane);
10  
    dm_setFieldUnlessNull(fontSize := fontSize(textPane));
11  
  });
12  
  
13  
  visual onResize(rstAdjust, jscroll(textPane = fontSize(fontSize, dm_centeredTextPane('text))));
14  
  start { dm_watchField('text, rstAdjust); }
15  
}

download  show line numbers  debug dex  old transpilations   

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

No comments. add comment

Snippet ID: #1022998
Snippet name: Screen-Filling Text [OK, just a little slow]
Eternal ID of this version: #1022998/23
Text MD5: 6fb9c7ac9bb166363088ca1347030854
Transpilation MD5: e3bfff77cd6406955c641fd5c2942cb6
Author: stefan
Category: javax / stefan's os
Type: JavaX source code (Dynamic Module)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-04-20 01:37:57
Source code size: 455 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 271 / 848
Version history: 22 change(s)
Referenced in: [show references]