(Menu menu, String label, int shortcut, boolean shift)
| 460 | } |
| 461 | |
| 462 | static void addItem(Menu menu, String label, int shortcut, boolean shift) { |
| 463 | if (menu==null) |
| 464 | return; |
| 465 | MenuItem item; |
| 466 | if (shortcut==0) |
| 467 | item = new MenuItem(label); |
| 468 | else { |
| 469 | if (shift) { |
| 470 | item = new MenuItem(label, new MenuShortcut(shortcut, true)); |
| 471 | shortcuts.put(Integer.valueOf(shortcut+200),label); |
| 472 | } else { |
| 473 | item = new MenuItem(label, new MenuShortcut(shortcut)); |
| 474 | shortcuts.put(Integer.valueOf(shortcut),label); |
| 475 | } |
| 476 | } |
| 477 | if (addSorted) { |
| 478 | if (menu==pluginsMenu) |
| 479 | addItemSorted(menu, item, userPluginsIndex); |
| 480 | else |
| 481 | addOrdered(menu, item); |
| 482 | } else |
| 483 | menu.add(item); |
| 484 | item.addActionListener(ij); |
| 485 | fixFontSize(item); |
| 486 | } |
| 487 | |
| 488 | void addPlugInItem(Menu menu, String label, String className, int shortcut, boolean shift) { |
| 489 | pluginsTable.put(label, className); |
no test coverage detected