Libraryless. Click here for Pure Java version (14721L/102K).
!7 module FontPlus > DynSingleFunctionWithPrintLog { transient volatile bool active; double scale = 1.25; start { ownResource(vmBus_onMessage('mouseDown, voidfunc(int x, int y, int button) { if (!active) ret; active = false; final JComponent c = optCast(JComponent, componentAtScreenLocation(x, y)); print("Have component: " + c); if (c == null) ret; swing { Font font = scaleFont(c.getFont(), scale); c.setFont(font); print("Enlarged font to " + formatDouble(font.getSize2D(), 1)); } })); } void doIt { print("Please click on a component to enlarge its font"); set active; } }
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1019642 |
Snippet name: | Font Plus |
Eternal ID of this version: | #1019642/6 |
Text MD5: | 7fc3dfd11b49a00e2035cc887f3677cf |
Transpilation MD5: | 3575b27e63a6bfb29a3bb8af37fbf317 |
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: | 2018-11-15 16:40:37 |
Source code size: | 703 bytes / 26 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 335 / 2007 |
Version history: | 5 change(s) |
Referenced in: | #1019643 - Font Plus/Minus (enlarge/shrink font size of components by clicking on them) |