1 | scope packInternalFrameInTopRightCorner. |
2 | |
3 | static int #marginX = 20, #marginY = 20; |
4 | |
5 | static <A extends Component> A packInternalFrameInTopRightCorner(final A c) { |
6 | final JInternalFrame win = getInternalFrame(c); |
7 | if (win == null || getParent(win) == null) ret c; |
8 | swing { |
9 | win.pack(); |
10 | int w = getParent(win).getWidth(); |
11 | win.setLocation(w-win.getWidth()-packInternalFrameInTopRightCorner_marginX, marginY); |
12 | fixInternalFrame(win); |
13 | } |
14 | ret c; |
15 | } |
16 | |
17 | end scope |
download show line numbers debug dex old transpilations
Travelled to 14 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1016239 |
Snippet name: | packInternalFrameInTopRightCorner |
Eternal ID of this version: | #1016239/4 |
Text MD5: | 88f7b3ffc92f54220f43fefb8c0a8a61 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-06-11 15:53:19 |
Source code size: | 487 bytes / 17 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 483 / 495 |
Version history: | 3 change(s) |
Referenced in: | [show references] |