1 | static Dimension componentsBoundingSize(Container container, int insetBottomRight) { |
2 | Rectangle r = new Rectangle(0, 0, 0, 0); |
3 | for (Component c : container.getComponents()) |
4 | r = rectangleUnion(r, c.getBounds()); |
5 | ret new Dimension(r.x+r.width+insetBottomRight, r.y+r.height+insetBottomRight); |
6 | } |
Began life as a copy of #1008594
download show line numbers debug dex old transpilations
Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1008597 |
Snippet name: | componentsBoundingSize |
Eternal ID of this version: | #1008597/1 |
Text MD5: | 885012fb5fb478456099d02483d03f60 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2017-05-25 13:37:07 |
Source code size: | 306 bytes / 6 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 537 / 574 |
Referenced in: | [show references] |