svoid stefansOS_popInModule(Module m) ctex { swing(r { final JInternalFrame myFrame = cast getPossiblyInternalFrame(m.vis); if (myFrame == null) ret; JDesktopPane desktopPane = cast getParent(myFrame); if (desktopPane == main.desktop) ret; removeFromParent(myFrame); myFrame.updateUI(); myFrame.setMaximum(false); myFrame.setMaximizable(true); myFrame.setClosable(true); myFrame.setIconifiable(true); main.desktop.add(myFrame); //print("Layer: " + main.desktop.getLayer(myFrame)); Rectangle bounds = rectangleFromScreenToComponent(boundsOnScreen(getFrame(desktopPane)), main.desktop); //print("Setting bounds: " + bounds); if (bounds != null) myFrame.setBounds(bounds); fixInternalFrame(myFrame); myFrame.toFront(); myFrame.setSelected(true); print("Have bounds: " + getBounds(myFrame); disposeFrame(desktopPane); desktopPane = null; m.enhanceFrame(myFrame); // re-add title menus cset(m, poppedOut := false); vmBus_send modulePoppedIn(m, myFrame); }); }
Began life as a copy of #1020195
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv
No comments. add comment
Snippet ID: | #1020196 |
Snippet name: | stefansOS_popInModule - move to main desktop again |
Eternal ID of this version: | #1020196/11 |
Text MD5: | dea1e85b1f1db6bb399f7feacf43728b |
Author: | stefan |
Category: | javax / stefan's os |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2022-03-16 16:56:59 |
Source code size: | 1094 bytes / 30 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 306 / 384 |
Version history: | 10 change(s) |
Referenced in: | [show references] |