1 | svoid makePopupMenuFullyDynamic(JMenu menu, final VF1<JPopupMenu> populate) { |
2 | addMenuListener(menu, new PopupMenuListener { |
3 | public void popupMenuWillBecomeVisible(PopupMenuEvent e) { |
4 | clearPopupMenu(menu); |
5 | callF(populate, menu); |
6 | } |
7 | |
8 | public void popupMenuWillBecomeInvisible(PopupMenuEvent e) { |
9 | clearPopupMenu(menu); |
10 | } |
11 | |
12 | public void popupMenuCanceled(PopupMenuEvent e) { |
13 | clearPopupMenu(menu); |
14 | } |
15 | }); |
16 | } |
Began life as a copy of #1020521
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: | #1020523 |
Snippet name: | makePopupMenuFullyDynamic |
Eternal ID of this version: | #1020523/1 |
Text MD5: | c0bc9c6c5d399122b0b1fefaca3ac9e9 |
Author: | stefan |
Category: | javax / gui |
Type: | JavaX fragment (include) |
Public (visible to everyone): | Yes |
Archived (hidden from active list): | No |
Created/modified: | 2018-12-25 19:10:09 |
Source code size: | 471 bytes / 16 lines |
Pitched / IR pitched: | No / No |
Views / Downloads: | 303 / 308 |
Referenced in: | [show references] |