Libraryless. Click here for Pure Java version (1940L/13K).
please include function componentPopupMenu. static JPopupMenu showInternalFramePopupMenu(final JInternalFrame f) { ret f == null ? null : swing(func -> JPopupMenu { componentPopupMenu_init(); L maker = cast _get(findComponentPopupMenuListener_gen(f), 'maker); if (empty(maker)) null; new JPopupMenu menu; int emptyCount = menu.getComponentCount(); componentPopupMenu_mouseEvent.set(new MouseEvent (f, MouseEvent.MOUSE_PRESSED, now(), 0, 30, 15, 1, true)); for (O menuMaker : maker) pcallF(menuMaker, menu); // show menu if any items in it if (menu.getComponentCount() == emptyCount) null; menu.show(f, 30, 15); // ? ret menu; }); }
download show line numbers debug dex old transpilations
Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, irmadwmeruwu, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt
No comments. add comment
Snippet ID: | #1020020 |
Snippet name: | showInternalFramePopupMenu |
Eternal ID of this version: | #1020020/12 |
Text MD5: | bde31ca4d3b098981f4ff084c30906bc |
Transpilation MD5: | 1ec0cee89bb97fc9152bc1e80d2bf793 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2019-02-27 13:31:46 |
Source code size: | 732 bytes / 23 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 276 / 396 |
Version history: | 11 change(s) |
Referenced in: | #1006654 - Standard functions list 2 (LIVE, continuation of #761) #1032115 - copyInternalFramePopupMenu |