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 voidaddEditMenu(JPopupMenu menu, boolean removable) static voidaddFileMenu(JPopupMenu pop) static voidaddFileMenu(JPopupMenu menu, boolean addSaveTestFragmentMenu) static voidaddPasteResetMenu(JPopupMenu menu) static booleancanAddTo(JMeterTreeNode parentNode, JMeterTreeNode[] nodes) Determine whether or not nodes can be added to this parent.static booleancanAddTo(JMeterTreeNode parentNode, org.apache.jmeter.testelement.TestElement element) Determine whether or not nodes can be added to this parent.static JPopupMenustatic JPopupMenustatic JPopupMenustatic JPopupMenustatic JPopupMenustatic JPopupMenustatic JPopupMenustatic JPopupMenustatic JMenuCreate a menu from a menu category.static JMenuItemmakeMenuItem(String label, String name, String actionCommand) Create a single menu itemstatic JMenuItemmakeMenuItemRes(String resource, String actionCommand) Create a single menu item from the resource name.static JMenustatic voidsetEnabled(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- TheJMeterTreeNodeto 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- TheJMeterTreeNodeto 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
-