static L<Component> stackElementsShowing(final DynamicStack stack) { ret swing(func -> L<Component> { new L<Component> l; if (!stack.isShowing()) ret l; JScrollPane sp = enclosingScrollPane(stack); if (sp == null) ret l; JViewport vp = sp.getViewport(); Rect vpRect = toRect(vp.getBounds()); for (Component c : stack.components()) if (rectsIntersect(vpRect, boundsInParent(c, vp))) l.add(c); ret l; }); }
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: | 364 / 407 |
Version history: | 3 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) |