Package org.apache.jmeter.gui.action
Class LoadRecentProject
java.lang.Object
org.apache.jmeter.gui.action.AbstractAction
org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest
org.apache.jmeter.gui.action.Load
org.apache.jmeter.gui.action.LoadRecentProject
- All Implemented Interfaces:
Command
Handles the loading of recent files, and also the content and
visibility of menu items for loading the recent files
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Called to handleActionEvent
only if no test is runningstatic String
getRecentFile
(int index) Get the full path to the recent file where index 0 is the most recentstatic List<JComponent>
Get the menu items to add to the menu bar, to get recent file functionalitystatic boolean
hasVisibleMenuItem
(List<? extends JComponent> fileLoadRecentFiles) static void
updateRecentFileMenuItems
(List<JComponent> menuItems, String loadedFileName) Update the content and visibility of the menu items for recent filesMethods inherited from class org.apache.jmeter.gui.action.Load
insertLoadedTree, insertLoadedTree
Methods inherited from class org.apache.jmeter.gui.action.AbstractActionWithNoRunningTest
doAction
Methods inherited from class org.apache.jmeter.gui.action.AbstractAction
getParentFrame, popupCheckExistingFileListener, popupShouldSave
-
Constructor Details
-
LoadRecentProject
public LoadRecentProject()
-
-
Method Details
-
getActionNames
- Specified by:
getActionNames
in interfaceCommand
- Overrides:
getActionNames
in classLoad
-
doActionAfterCheck
Description copied from class:AbstractActionWithNoRunningTest
Called to handleActionEvent
only if no test is running- Overrides:
doActionAfterCheck
in classLoad
- Parameters:
e
-ActionEvent
-
getRecentFileMenuItems
Get the menu items to add to the menu bar, to get recent file functionality- Returns:
- a List of JMenuItem, representing recent files. JMenuItem may not be visible
-
updateRecentFileMenuItems
Update the content and visibility of the menu items for recent files- Parameters:
menuItems
- the JMenuItem to updateloadedFileName
- the file name of the project file that has just been loaded
-
getRecentFile
Get the full path to the recent file where index 0 is the most recent- Parameters:
index
- the index of the recent file- Returns:
- full path to the recent file at
index
-
hasVisibleMenuItem
- Parameters:
fileLoadRecentFiles
- List of JMenuItem- Returns:
- true if at least on JMenuItem is visible
-