edu.rice.cs.drjava.ui
Class RecentFileManager

java.lang.Object
  |
  +--edu.rice.cs.drjava.ui.RecentFileManager
All Implemented Interfaces:
OptionConstants

public class RecentFileManager
extends Object
implements OptionConstants


Field Summary
(package private)  JMenu _fileMenu
           
(package private)  MainFrame _frame
           
(package private)  Action _open
           
(package private)  int _pos
           
(package private)  gj.util.Vector _recentFiles
           
(package private)  gj.util.Vector _recentMenuItems
           
(package private)  int MAX
           
 
Fields inherited from interface edu.rice.cs.drjava.config.OptionConstants
COMPILER_ERROR_COLOR, DEBUG_BREAKPOINT_COLOR, DEBUG_SHOW_THREADS, DEBUG_SOURCEPATH, DEBUG_STEP_DRJAVA, DEBUG_STEP_INTERPRETER, DEBUG_STEP_JAVA, DEBUG_THREAD_COLOR, DEFINITIONS_BACKGROUND_COLOR, DEFINITIONS_COMMENT_COLOR, DEFINITIONS_DOUBLE_QUOTED_COLOR, DEFINITIONS_KEYWORD_COLOR, DEFINITIONS_MATCH_COLOR, DEFINITIONS_NORMAL_COLOR, DEFINITIONS_NUMBER_COLOR, DEFINITIONS_SINGLE_QUOTED_COLOR, DEFINITIONS_TYPE_COLOR, EXTRA_CLASSPATH, FONT_DOCLIST, FONT_MAIN, FONT_TOOLBAR, HISTORY_MAX_SIZE, INDENT_LEVEL, INTERACTIONS_EXIT_PROMPT, JAVAC_ALLOW_ASSERT, JAVAC_LOCATION, JSR14_COLLECTIONSPATH, JSR14_LOCATION, KEY_BACKWARD, KEY_BEGIN_DOCUMENT, KEY_BEGIN_LINE, KEY_CLOSE_FILE, KEY_COMPILE, KEY_COMPILE_ALL, KEY_COPY, KEY_CUT, KEY_CUT_LINE, KEY_DEBUG_BREAKPOINT_TOGGLE, KEY_DEBUG_MODE_TOGGLE, KEY_DEBUG_RESUME, KEY_DEBUG_STEP_INTO, KEY_DEBUG_STEP_OUT, KEY_DEBUG_STEP_OVER, KEY_DELETE_NEXT, KEY_DELETE_PREVIOUS, KEY_DOWN, KEY_END_DOCUMENT, KEY_END_LINE, KEY_FIND_NEXT, KEY_FIND_REPLACE, KEY_FORWARD, KEY_GOTO_LINE, KEY_NEW_FILE, KEY_NEXT_DOCUMENT, KEY_NEXT_WORD, KEY_OPEN_FILE, KEY_PAGE_DOWN, KEY_PAGE_UP, KEY_PASTE, KEY_PREVIOUS_DOCUMENT, KEY_PREVIOUS_WORD, KEY_PRINT, KEY_PRINT_PREVIEW, KEY_QUIT, KEY_REDO, KEY_SAVE_FILE, KEY_SAVE_FILE_AS, KEY_SELECT_ALL, KEY_UNDO, KEY_UP, LINEENUM_ENABLED, mask, QUIT_PROMPT, RECENT_FILES, RECENT_FILES_MAX_SIZE, TOOLBAR_ICONS_ENABLED, TOOLBAR_TEXT_ENABLED, WORKING_DIRECTORY
 
Constructor Summary
RecentFileManager(int pos, JMenu fileMenu, MainFrame frame)
           
 
Method Summary
 gj.util.Vector getFileVector()
           
 void numberItems()
          Trims the recent file list to the configured size and numbers the remaining files according to their position in the list
 void removeIfInList(File file)
           
 void saveRecentFiles()
           
 void updateMax(int newMax)
           
 void updateOpenFiles(File file)
           
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_pos

int _pos

_recentFiles

gj.util.Vector _recentFiles

_recentMenuItems

gj.util.Vector _recentMenuItems

MAX

int MAX

_fileMenu

JMenu _fileMenu

_open

Action _open

_frame

MainFrame _frame
Constructor Detail

RecentFileManager

public RecentFileManager(int pos,
                         JMenu fileMenu,
                         MainFrame frame)
Method Detail

getFileVector

public gj.util.Vector getFileVector()

updateMax

public void updateMax(int newMax)

saveRecentFiles

public void saveRecentFiles()

updateOpenFiles

public void updateOpenFiles(File file)

removeIfInList

public void removeIfInList(File file)

numberItems

public void numberItems()
Trims the recent file list to the configured size and numbers the remaining files according to their position in the list