1 | static Area actuallyVisibleComponentArea(Component c) {
|
2 | ret c == null ? null : swing(func -> Area {
|
3 | Area area = new Area(0, 0, new Rectangle(getWidth(c), getHeight(c))); |
4 | Container parent = c.getParent(); |
5 | if (parent == null) ret area; |
6 | for (Component peer : componentsSortedByZOrder(getChildren(parent))) {
|
7 | if (peer = c) break; |
8 | area.subtract(peer.getBounds()); |
9 | } |
10 | Area parentArea = actuallyVisibleComponentArea(parent); |
11 | parentArea.transform(AffineTransform.getTranslateInstance(-c.getX(), -c.getY())); |
12 | area.intersect(parentArea); |
13 | ret area; |
14 | }); |
15 | } |
download show line numbers debug dex old transpilations
Travelled to 8 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1020034 |
| Snippet name: | actuallyVisibleComponentArea (dev.) |
| Eternal ID of this version: | #1020034/2 |
| Text MD5: | 66eaa01ed30f107b412362f5e4d23535 |
| Author: | stefan |
| Category: | javax / gui |
| Type: | JavaX fragment (include) |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2018-12-04 16:33:57 |
| Source code size: | 608 bytes / 15 lines |
| Pitched / IR pitched: | No / No |
| Views / Downloads: | 549 / 581 |
| Version history: | 1 change(s) |
| Referenced in: | [show references] |