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

10
LINES

< > BotCompany Repo | #1006548 // tablePopupMenuItem - adds to the menu if it already exists

JavaX fragment (include)

// action: voidfunc(int row)
svoid tablePopupMenuItem(JTable table, S name, O action) {
  tablePopupMenu(table, voidfunc(JPopupMenu menu, final int row) {
    addMenuItem(menu, name, r { pcallF(action, row) });
  });
}

svoid tablePopupMenuItem(JTable table, S name, IVF1<Int> action) {
  tablePopupMenuItem(table, name, (O) action);
}

Author comment

Began life as a copy of #1004446

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: #1006548
Snippet name: tablePopupMenuItem - adds to the menu if it already exists
Eternal ID of this version: #1006548/2
Text MD5: 2fd902c6bb824fe57417c72230d039c3
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2021-03-18 23:08:36
Source code size: 344 bytes / 10 lines
Pitched / IR pitched: No / No
Views / Downloads: 570 / 611
Version history: 1 change(s)
Referenced in: #1006654 - Standard functions list 2 (LIVE, continuation of #761)
#1006764 - titlePopupMenuItem - adds to the menu if it already exists
#1009959 - listPopupMenuItem - adds to the menu if it already exists
#1011070 - tablePopupMenuItemFirst - adds to beginning of menu
#1015112 - tablePopupMenuItemAndDoubleClick
#1019047 - tablePopupMenuItem_top - adds to the menu if it already exists