Libraryless. Click here for Pure Java version (15517L/92K).
asclass DMPopOutHandler { transient DynModule module; transient JButton popDownButton; abstract void addControl(JComponent c); void start { module = dm_current_mandatory(); dm_vmBus_onMessages_q(ll("modulePoppedOut", "modulePoppedIn"), (m, myFrame) -> { if (dm_isMe(m)) adjustUIForPoppedOutWindow(); }); } void adjustUIForPoppedOutWindow swing { if (popDownButton == null) { Window window = cast getWindow(dm_vis()); var popBackInButton = findButton(window, "Pop Back In"); var parent = getParent(popBackInButton); print(+parent); removeFromParent(parent); // hide controls popDownButton = jPopDownButton_noText( "Pop Back In", r { dm_popInModule(module) }, jCheckBoxMenuItem("Always On Top", isAlwaysOnTop(window), r { temp module.enter(); dm_toggleAlwaysOnTop(); }), ); addControl(popDownButton); } } }
download show line numbers debug dex old transpilations
Travelled to 4 computer(s): bhatertpkbcr, ekrmjmnbrukm, mowyntqkapby, mqqgnosmbjvj
No comments. add comment
| Snippet ID: | #1033657 |
| Snippet name: | DMPopOutHandler [does it work?] |
| Eternal ID of this version: | #1033657/4 |
| Text MD5: | 922e868e4aa4c7471975bed4b6aa9f31 |
| Transpilation MD5: | 42a8bcad3f0c01eee6d37fa12e053ee4 |
| Author: | stefan |
| Category: | javax / screen recognition |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2021-12-26 15:58:56 |
| Source code size: | 999 bytes / 34 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 365 / 535 |
| Version history: | 3 change(s) |
| Referenced in: | [show references] |