MCPcopy Create free account
hub / github.com/AstroImageJ/astroimagej / addOpenRecentSubMenu

Method addOpenRecentSubMenu

ij/src/main/java/ij/Menus.java:450–460  ·  view source on GitHub ↗
(Menu menu)

Source from the content-addressed store, hash-verified

448 }
449
450 void addOpenRecentSubMenu(Menu menu) {
451 openRecentMenu = getMenu("File>Open Recent");
452 for (int i=0; i<MAX_OPEN_RECENT_ITEMS; i++) {
453 String path = Prefs.getString("recent" + (i/10)%10 + i%10);
454 if (path==null) break;
455 MenuItem item = new MenuItem(path);
456 openRecentMenu.add(item);
457 item.addActionListener(ij);
458 }
459 menu.add(openRecentMenu);
460 }
461
462 static void addItem(Menu menu, String label, int shortcut, boolean shift) {
463 if (menu==null)

Callers 1

addMenuBarMethod · 0.95

Calls 4

getMenuMethod · 0.95
getStringMethod · 0.95
addActionListenerMethod · 0.80
addMethod · 0.65

Tested by

no test coverage detected