Class RMRecentFilesMenu


public class RMRecentFilesMenu extends SwingOwner
This class maintains the list of the recently used files. It stores the list in the user's preferences, and maintains the 'recent documents' menu.
  • Constructor Details

    • RMRecentFilesMenu

      public RMRecentFilesMenu(RMEditorPaneMenuBar bar)
      Creates a new recent file smenu for the given editor pane
  • Method Details

    • addMostRecentDocument

      public void addMostRecentDocument(String aPath)
      Adds a new document to the list and updates the users preferences.
    • getMenu

      public JMenu getMenu()
      Returns the actual menu.
    • rebuildMenu

      protected void rebuildMenu()
      Rebuilds the menu.
    • installMenu

      protected void installMenu()
      Installs recent files menu under editor pane OpenRecentMenu.
    • getRecentDocuments

      public static List<String> getRecentDocuments()
      Returns the list of the recent documents as a list of strings.
    • createUI

      protected SpringsPane createUI()
      Bogus implementation to return an empty panel.
      Overrides:
      createUI in class SwingOwner
    • respondUI

      public void respondUI(SwingEvent anEvent)
      Respond to any selection from the RecentFiles menu
      Overrides:
      respondUI in class UIOwner<SwingEvent,JComponent>
    • clearMostRecentDocuments

      public void clearMostRecentDocuments()
      Clears most recent documents from preferences.