Libraryless. Click here for Pure Java version (2717L/17K).
1 | sclass JAutoWidthHTMLLabel extends JLabel {
|
2 | IF0<S> makeContents; |
3 | |
4 | *(IF0<S> *makeContents) {
|
5 | topAlignLabel(this); |
6 | onResize(this, r update); |
7 | } |
8 | |
9 | void update swing {
|
10 | setText(hhtml(hdiv(unnull(makeContents!), width := getWidth()))); |
11 | } |
12 | } |
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: | #1026596 |
| Snippet name: | JAutoWidthHTMLLabel |
| Eternal ID of this version: | #1026596/2 |
| Text MD5: | ef6e40d4fee05219ea815b0873938157 |
| Transpilation MD5: | 8aadb2a5136f03d6a7e342148178c509 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2020-01-15 14:20:37 |
| Source code size: | 268 bytes / 12 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 467 / 856 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |