Class RecentFiles


  • public class RecentFiles
    extends java.lang.Object
    The shared, global list of recently opened component and project files.
    Since:
    3.0
    Author:
    Chris Jennings
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static int MAXIMUM_LIST_SIZE
      The maximum number of recent files that will be tracked.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void addRecentDocument​(java.io.File file)
      Adds an entry to the list of recent documents.
      static void addRecentProject​(java.io.File file)
      Adds an entry to the list of recent projects.
      static void clear()
      Clear all recent documents and projects.
      static int getNumberOfFilesToDisplay()
      Returns the maximum number of files that the user wishes to include in the recent file list.
      static java.util.List<java.io.File> getRecentDocuments()
      Returns an immutable list of recently opened document files.
      static java.util.List<java.io.File> getRecentProjects()
      Returns an immutable list of recently opened project files.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • MAXIMUM_LIST_SIZE

        public static final int MAXIMUM_LIST_SIZE
        The maximum number of recent files that will be tracked.
        See Also:
        Constant Field Values
    • Method Detail

      • getRecentDocuments

        public static java.util.List<java.io.File> getRecentDocuments()
        Returns an immutable list of recently opened document files.
      • getRecentProjects

        public static java.util.List<java.io.File> getRecentProjects()
        Returns an immutable list of recently opened project files.
      • addRecentProject

        public static void addRecentProject​(java.io.File file)
        Adds an entry to the list of recent projects.
        Parameters:
        file - the non-null project directory or package file to add
      • addRecentDocument

        public static void addRecentDocument​(java.io.File file)
        Adds an entry to the list of recent documents.
        Parameters:
        file - the non-null document file to add
      • clear

        public static void clear()
        Clear all recent documents and projects.
      • getNumberOfFilesToDisplay

        public static int getNumberOfFilesToDisplay()
        Returns the maximum number of files that the user wishes to include in the recent file list. This will be a number between 0 and MAXIMUM_LIST_SIZE, inclusive.
        Returns:
        the maximum number of files displayed in the recent file list