Libraryless. Click here for Pure Java version (2558L/17K).
// pairs: (HTML text, false=left/true=right) sS htmlForJLabel_chatConvo_table(LPair<S, Bool> dialog, int width) { ret tag table(lines(mapPairsToList(dialog, (contents, right) -> { S color = right ? "#9999FF" : "#99FF99"; int fontSize = right ? 13 : 15; ret tr(td(tag table(tr(td(contents, style := "font-size: \*fontSize*/px; background: \*color*/; padding: 5px"))), align := right ? "right" : null, style := "margin-" + (right ? "left" : "right") + ": 20px")); })), +width); }
Began life as a copy of #1026592
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: | #1026599 |
Snippet name: | htmlForJLabel_chatConvo_table |
Eternal ID of this version: | #1026599/4 |
Text MD5: | 731b688a889171b627ebcae4823d3144 |
Transpilation MD5: | 3061271220fbd1c4e66ac577307c1b58 |
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 15:01:32 |
Source code size: | 513 bytes / 10 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 277 / 380 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |