1 | JMenu makeMenus(String[] categories, String label, String actionCommand) {↵ | | 1 | JMenu makeMenus(String[] categories, String label, String actionCommand) {↵
|
2 | JMenu addMenu = new JMenu(label);↵ | | 2 | JMenu addMenu = new JMenu(label);↵
|
3 | for (int i = 0; i < categories.length; i++) {↵ | | 3 | for (int i = 0; i < categories.length; i++) {↵
|
4 | addMenu.add(makeMenu(categories[i], actionCommand));↵ | | 4 | addMenu.add(makeMenu(categories[i], actionCommand));↵
|
5 | }↵ | | 5 | }↵
|
6 | return addMenu;↵ | | 6 | return addMenu;↵
|
7 | }↵ | | 7 | }↵
|
|
8 | public static JPopupMenu getDefaultControllerMenu() {↵ | | 8 | public static JPopupMenu getDefaultControllerMenu() {↵
|
9 | JPopupMenu pop = new JPopupMenu();↵ | | 9 | JPopupMenu pop = new JPopupMenu();↵
|
10 | pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER,↵ | | 10 | pop.add(MenuFactory.makeMenus(MENU_ADD_CONTROLLER, ↵
|
11 | JMeterUtils.getResString("add"),// $NON-NLS-1$↵ | | 11 | JMeterUtils.getResString("add"),// $NON-NLS-1$↵
|
12 | ActionNames.ADD));↵ | | 12 | ActionNames.ADD));↵
|
13 | pop.add(makeMenus(MENU_PARENT_CONTROLLER, ↵ | | 13 | pop.add(makeMenus(MENU_PARENT_CONTROLLER, ↵
|
14 | JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$↵ | | 14 | JMeterUtils.getResString("insert_parent"),// $NON-NLS-1$↵
|
15 | ActionNames.ADD_PARENT));↵ | | 15 | ActionNames.ADD_PARENT));↵
|
16 | MenuFactory.addEditMenu(pop, true);↵ | | 16 | MenuFactory.addEditMenu(pop, true);↵
|
17 | MenuFactory.addFileMenu(pop);↵ | | 17 | MenuFactory.addFileMenu(pop);↵
|
18 | return pop;↵ | | 18 | return pop;↵
|
19 | | | 19 |
|