1 | static L<Component> stackElementsShowing(final DynamicStack stack) { |
2 | ret swing(func -> L<Component> { |
3 | new L<Component> l; |
4 | if (!stack.isShowing()) ret l; |
5 | JScrollPane sp = enclosingScrollPane(stack); |
6 | if (sp == null) ret l; |
7 | JViewport vp = sp.getViewport(); |
8 | Rect vpRect = toRect(vp.getBounds()); |
9 | for (Component c : stack.components()) |
10 | if (rectsIntersect(vpRect, boundsInParent(c, vp))) |
11 | l.add(c); |
12 | ret l; |
13 | }); |
14 | } |
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: | #1015372 |
Snippet name: | stackElementsShowing |
Eternal ID of this version: | #1015372/4 |
Text MD5: | e4c31fcb8dd5a4bd3e89ffcbaf6918f0 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-05-31 15:13:53 |
Source code size: | 467 bytes / 14 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 363 / 406 |
Version history: | 3 change(s) |
Referenced in: | [show references] |