Uses 911K of libraries. Click here for Pure Java version (3521L/18K).
!7 cmodule SwitchLAF { transient SS entries = litorderedmap( "" := "Default (Windows/JTattoo)", //"webLAF" := "WebLAF", // BROKEN "jtattoo" := "JTattoo", "nimbus" := "Nimbus", "substance" := "Substance", "substance Creme" := "Substance/Creme", "substance Sahara" := "Substance/Sahara", "platform" := "Platform"); visualize { if (!hasMethodNamed(dm_os(), 'setLAF)) ret jcenteredlabel("Please upgrade " + dm_osName()); ButtonGroup buttons = jRadioButtons(values(entries)); S laf = cast dm_callOSOpt getLAF(); selectRadioButton(buttons, indexOfIC(keysList(entries), laf)); onRadioButtonChange(buttons, voidfunc(int i) { S laf = _get(keysList(entries), i); dm_callOS setLAF(laf); thread { if (confirmOKCancel("Look&Feel changed. Restart " + dm_osName() + "?")) dm_restartOS(); } }); ret jfullcenter(vstackWithSpacing(buttonsInGroup(buttons))); } }
download show line numbers debug dex old transpilations
Travelled to 6 computer(s): bhatertpkbcr, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1025712 |
| Snippet name: | Switch OS Look & Feel |
| Eternal ID of this version: | #1025712/12 |
| Text MD5: | b6e03f8c367568e67611edd417f7e72f |
| Transpilation MD5: | 9a8e69c2f7a977aeb71ce084e05850ba |
| Author: | stefan |
| Category: | javax |
| Type: | JavaX source code (Dynamic Module) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2019-10-15 16:07:21 |
| Source code size: | 996 bytes / 31 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 421 / 1720 |
| Version history: | 11 change(s) |
| Referenced in: | [show references] |