Package org.apache.jmeter.gui.util
Class MenuFactory
java.lang.Object
org.apache.jmeter.gui.util.MenuFactory
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic void
addEditMenu
(JPopupMenu menu, boolean removable) static void
addFileMenu
(JPopupMenu pop) static void
addFileMenu
(JPopupMenu menu, boolean addSaveTestFragmentMenu) static void
addPasteResetMenu
(JPopupMenu menu) static boolean
canAddTo
(JMeterTreeNode parentNode, JMeterTreeNode[] nodes) Determine whether or not nodes can be added to this parent.static boolean
canAddTo
(JMeterTreeNode parentNode, TestElement element) Determine whether or not nodes can be added to this parent.static JPopupMenu
static JPopupMenu
static JPopupMenu
static JPopupMenu
static JPopupMenu
static JPopupMenu
static JPopupMenu
static JPopupMenu
static JMenu
Create a menu from a menu category.static JMenu
makeMenu
(Collection<MenuInfo> menuInfo, String actionCommand, String menuName) Create a menu from a collection of items.static JMenuItem
makeMenuItem
(String label, String name, String actionCommand) Create a single menu itemstatic JMenuItem
makeMenuItem
(String label, String name, String actionCommand, KeyStroke accel) static Component
makeMenuItem
(MenuInfo info, String actionCommand) Create a single menu item from a MenuInfo objectstatic JMenuItem
makeMenuItemRes
(String resource, String actionCommand) Create a single menu item from the resource name.static JMenuItem
makeMenuItemRes
(String resource, String actionCommand, KeyStroke accel) static JMenu
static void
setEnabled
(JMenu menu)
-
Field Details
-
THREADS
- See Also:
-
FRAGMENTS
- See Also:
-
TIMERS
- See Also:
-
CONTROLLERS
- See Also:
-
SAMPLERS
- See Also:
-
CONFIG_ELEMENTS
- See Also:
-
POST_PROCESSORS
- See Also:
-
PRE_PROCESSORS
- See Also:
-
ASSERTIONS
- See Also:
-
NON_TEST_ELEMENTS
- See Also:
-
LISTENERS
- See Also:
-
-
Method Details
-
addEditMenu
-
addPasteResetMenu
-
addFileMenu
-
addFileMenu
- Parameters:
menu
- JPopupMenuaddSaveTestFragmentMenu
- Add Save as Test Fragment menu if true
-
makeMenus
-
getDefaultControllerMenu
-
getDefaultSamplerMenu
-
getDefaultConfigElementMenu
-
getDefaultVisualizerMenu
-
getDefaultTimerMenu
-
getDefaultAssertionMenu
-
getDefaultExtractorMenu
-
getDefaultMenu
-
makeMenu
Create a menu from a menu category.- Parameters:
category
- - predefined string (used as key for menuMap HashMap and messages.properties lookup)actionCommand
- - predefined string, e.g. ActionNames.ADD- Returns:
- the menu
- See Also:
-
makeMenu
Create a menu from a collection of items.- Parameters:
menuInfo
- - collection of MenuInfo itemsactionCommand
- - predefined string, e.g. ActionNames.ADDmenuName
- The name of the newly created menu- Returns:
- the menu
- See Also:
-
setEnabled
-
makeMenuItem
Create a single menu item- Parameters:
label
- for the MenuItemname
- for the MenuItemactionCommand
- - predefined string, e.g. ActionNames.ADD- Returns:
- the menu item
- See Also:
-
makeMenuItemRes
Create a single menu item from the resource name.- Parameters:
resource
- for the MenuItemactionCommand
- - predefined string, e.g. ActionNames.ADD- Returns:
- the menu item
- See Also:
-
makeMenuItem
Create a single menu item from a MenuInfo object- Parameters:
info
- the MenuInfo objectactionCommand
- - predefined string, e.g. ActionNames.ADD- Returns:
- the menu item
- See Also:
-
makeMenuItemRes
-
makeMenuItem
-
canAddTo
Determine whether or not nodes can be added to this parent. Used by Merge- Parameters:
parentNode
- TheJMeterTreeNode
to test, if a new element can be added to itelement
- - top-level test element to be added- Returns:
- whether it is OK to add the element to this parent
-
canAddTo
Determine whether or not nodes can be added to this parent. Used by DragNDrop and Paste.- Parameters:
parentNode
- TheJMeterTreeNode
to test, ifnodes[]
can be added to itnodes
- - array of nodes that are to be added- Returns:
- whether it is OK to add the dragged nodes to this parent
-