| java.lang.Object edu.rice.cs.drjava.ui.RecentFileManager
RecentFileManager | public class RecentFileManager implements OptionConstants(Code) | | Manages a list of the most recently used files to be displayed
in the File menu.
version: $Id: RecentFileManager.java 4255 2007-08-28 19:17:37Z mgricken $ |
Inner Class :public interface RecentFileAction | |
Method Summary | |
public Vector<File> | getFileVector() Returns the list of recently used files, in order. | public void | numberItems() | public void | removeIfInList(File file) Removes the given file from the list if it is already there. | public void | saveRecentFiles() Saves the current list of files to the config object. | public void | updateMax(int newMax) Changes the maximum number of files to display in the list. | public void | updateOpenFiles(File file) Updates the list after the given file has been opened. |
MAX | protected int MAX(Code) | | The maximum number of files to display in the list.
|
_fileMenu | protected JMenu _fileMenu(Code) | | The File menu containing the entries.
|
_pos | protected int _pos(Code) | | Position in the file menu for the next insert.
|
_recentFileAction | protected RecentFileAction _recentFileAction(Code) | | An action that will be invoked when the file is clicked.
|
_recentFiles | protected Vector<File> _recentFiles(Code) | | All of the recently used files in the list, in order.
|
_recentMenuItems | protected Vector<JMenuItem> _recentMenuItems(Code) | | Menu items corresponding to each file in _recentFiles.
|
_settingConfigConstant | protected VectorOption<File> _settingConfigConstant(Code) | | The OptionConstant that should be used to retrieve the list of recent files.
|
RecentFileManager | public RecentFileManager(int pos, JMenu fileMenu, RecentFileAction action, VectorOption<File> settingConfigConstant)(Code) | | Creates a new RecentFileManager.
Parameters: pos - Position in the file menu Parameters: fileMenu - File menu to add the entry to |
getFileVector | public Vector<File> getFileVector()(Code) | | Returns the list of recently used files, in order.
|
numberItems | public void numberItems()(Code) | | Trims the recent file list to the configured size and numbers the
remaining files according to their position in the list
|
removeIfInList | public void removeIfInList(File file)(Code) | | Removes the given file from the list if it is already there.
Only removes the first occurrence of the file, since each
entry should be unique (based on canonical path).
|
saveRecentFiles | public void saveRecentFiles()(Code) | | Saves the current list of files to the config object.
|
updateMax | public void updateMax(int newMax)(Code) | | Changes the maximum number of files to display in the list.
Parameters: newMax - The new maximum number of files to display |
updateOpenFiles | public void updateOpenFiles(File file)(Code) | | Updates the list after the given file has been opened.
|
|
|