Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

25
LINES

< > BotCompany Repo | #1020949 // dm_onAnyModulePopupMenu - augment any module's popup menu

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10211L/72K).

svoid dm_onAnyModulePopupMenu(VF2<JPopupMenu, S> onMenu) {
  DynModule m = dm_current_mandatory();
  dm_vmBus_onMessage showingPopupMenu(voidfunc(JComponent c, JPopupMenu menu) {
    if (!classNameEndsWith(c, 'InternalFrameTitlePane)) ret;
    S module = dm_moduleForFrame(getInternalFrame(c));
    if (module == null) ret;
    temp m.enter();
    callF(onMenu, menu, module);
  });
}

svoid dm_onAnyModulePopupMenu(IVF2<JPopupMenu, S> onMenu) {
  dm_onAnyModulePopupMenu(ivf2ToVF2(onMenu));
}

svoid dm_onAnyModulePopupMenu(IVF3<JPopupMenu, S, Component> onMenu) {
  DynModule m = dm_current_mandatory();
  dm_vmBus_onMessage showingPopupMenu(voidfunc(JComponent c, JPopupMenu menu) {
    if (!classNameEndsWith(c, 'InternalFrameTitlePane)) ret;
    S module = dm_moduleForFrame(getInternalFrame(c));
    if (module == null) ret;
    temp m.enter();
    callF(onMenu, menu, module, c);
  });
}

download  show line numbers  debug dex  old transpilations   

Travelled to 9 computer(s): bhatertpkbcr, cfunsshuasjs, gwrvuhgaqvyk, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tvejysmllsmz, vouqrxazstgt, xrpafgyirdlv

No comments. add comment

Snippet ID: #1020949
Snippet name: dm_onAnyModulePopupMenu - augment any module's popup menu
Eternal ID of this version: #1020949/6
Text MD5: 709ef8a6c4460ec1f96b833908fcdd50
Transpilation MD5: f495d6a5bf0de3a71e06086391fb7842
Author: stefan
Category: javax / stefan's os
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2020-02-26 17:58:24
Source code size: 918 bytes / 25 lines
Pitched / IR pitched: No / No
Views / Downloads: 273 / 376
Version history: 5 change(s)
Referenced in: [show references]