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, 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 JMenumakeMenu(Collection<MenuInfo> menuInfo, String actionCommand, String menuName) Create a menu from a collection of items.static JMenuItemmakeMenuItem(String label, String name, String actionCommand) Create a single menu itemstatic JMenuItemmakeMenuItem(String label, String name, String actionCommand, KeyStroke accel) static ComponentmakeMenuItem(MenuInfo info, String actionCommand) Create a single menu item from a MenuInfo objectstatic JMenuItemmakeMenuItemRes(String resource, String actionCommand) Create a single menu item from the resource name.static JMenuItemmakeMenuItemRes(String resource, String actionCommand, KeyStroke accel) 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:
-
-
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
-
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
-
makeMenuItemRes
-
makeMenuItem
-
makeMenuItemRes
-
makeMenuItem
-
canAddTo
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
-