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

18
LINES

< > BotCompany Repo | #1007754 - standardTitlePopupMenu

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

Libraryless. Click here for Pure Java version (3375L/22K).

static void standardTitlePopupMenu(final JFrame frame) {
  // standard right-click behavior on titles
  if (!isSubstanceLAF()) ret;
  titlePopupMenu(frame, voidfunc(JPopupMenu menu) {
    bool alwaysOnTop = frame.isAlwaysOnTop();
    ifndef standardTitlePopupMenu_noProgramFunctions
      menu.add(jmenuItem("Restart Program", f restart));
      menu.add(jmenuItem("Duplicate Program", f duplicateThisProgram));
    endifndef
    menu.add(jmenuItem("Show Console", f showConsole));
    menu.add(jCheckBoxMenuItem("Always On Top", alwaysOnTop, r { toggleAlwaysOnTop(frame) }));
    /*ifndef standardTitlePopupMenu_noShootWindow
      { menu.add(jMenuItem("Shoot Window", r { shootWindowGUI_external(frame, 500) })); }
    endifndef*/
    //addMenuItem(menu, "Bigger fonts", f swingBiggerFonts);
    //addMenuItem(menu, "Smaller fonts", f swingSmallerFonts);
  });
}

download  show line numbers  debug dex   

Travelled to 11 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz

No comments. add comment

Snippet ID: #1007754
Snippet name: standardTitlePopupMenu
Eternal ID of this version: #1007754/12
Text MD5: 19d13c52fd504e9ae53aa503b77b8e5e
Transpilation MD5: db8c8536c7293636a9312bbf873d2d50
Author: stefan
Category: javax / gui
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2019-09-01 16:45:24
Source code size: 881 bytes / 18 lines
Pitched / IR pitched: No / No
Views / Downloads: 352 / 353
Version history: 11 change(s)
Referenced in: [show references]

Formerly at http://tinybrain.de/1007754 & http://1007754.tinybrain.de