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

      public class LoadRecentProject
      extends Load

  Handles the loading of recent files, and also the content and visibility of menu items for loading the recent files

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `LoadRecentProject()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `doActionAfterCheck(java.awt.event.ActionEvent e)` Called to handle `ActionEvent` only if no test is running
    `java.util.Set<java.lang.String>` | `getActionNames()`
    `static java.lang.String` | `getRecentFile(int index)` Get the full path to the recent file where index 0 is the most recent
    `static java.util.List<javax.swing.JComponent>` | `getRecentFileMenuItems()` Get the menu items to add to the menu bar, to get recent file functionality
    `static boolean` | `hasVisibleMenuItem(java.util.List<javax.swing.JComponent> fileLoadRecentFiles)`
    `static void` | `updateRecentFileMenuItems(java.util.List<javax.swing.JComponent> menuItems, java.lang.String loadedFileName)` Update the content and visibility of the menu items for recent files

    - ### Methods 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

      `popupCheckExistingFileListener, popupShouldSave`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### LoadRecentProject

          public LoadRecentProject()

  - ### Method Detail

    - #### getActionNames

          public java.util.Set<java.lang.String> getActionNames()

      Specified by:
        `getActionNames` in interface `Command`
      Overrides:
        `getActionNames` in class `Load`

    - #### doActionAfterCheck

          public void doActionAfterCheck(java.awt.event.ActionEvent e)

      Description copied from class: `AbstractActionWithNoRunningTest`
      Called to handle `ActionEvent` only if no test is running
      Overrides:
        `doActionAfterCheck` in class `Load`
      Parameters:
        `e` - `ActionEvent`

    - #### getRecentFileMenuItems

          public static java.util.List<javax.swing.JComponent> 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

          public static void updateRecentFileMenuItems(java.util.List<javax.swing.JComponent> menuItems,
                                                       java.lang.String loadedFileName)

      Update the content and visibility of the menu items for recent files
      Parameters:
        `menuItems` - the JMenuItem to update
        `loadedFileName` - the file name of the project file that has just been loaded

    - #### getRecentFile

          public static java.lang.String getRecentFile(int index)

      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

          public static boolean hasVisibleMenuItem(java.util.List<javax.swing.JComponent> fileLoadRecentFiles)

      Parameters:
        `fileLoadRecentFiles` - List of JMenuItem
      Returns:
        true if at least on JMenuItem is visible

Copyright © 1998-2019 Apache Software Foundation. All Rights Reserved.