Package org.apache.jmeter.gui.util
Class MenuFactory
java.lang.Object
org.apache.jmeter.gui.util.MenuFactory
-
Field Summary
-
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, org.apache.jmeter.testelement.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 JMenuItem
makeMenuItem
(String label, String name, String actionCommand) Create a single menu itemstatic JMenuItem
makeMenuItemRes
(String resource, String actionCommand) Create a single menu item from the resource name.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:
-
SEPARATOR
- 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}ActionNames
- Returns:
- the menu
-
setEnabled
-
makeMenuItem
Create a single menu item- Parameters:
label
- for the MenuItemname
- for the MenuItemactionCommand
- predefined string, e.g. ActionNames.ADDActionNames
- Returns:
- the menu item
-
makeMenuItemRes
Create a single menu item from the resource name.- Parameters:
resource
- for the MenuItemactionCommand
- predefined string, e.g. ActionNames.ADDActionNames
- Returns:
- the menu item
-
canAddTo
public static boolean canAddTo(JMeterTreeNode parentNode, org.apache.jmeter.testelement.TestElement element) 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
-