jAER project on SourceForge

net.sf.jaer.util
Class RecentFiles

java.lang.Object
  extended by net.sf.jaer.util.RecentFiles

public class RecentFiles
extends java.lang.Object

Keeps track of recent files used (e.g. in BiasgenFrame)

Author:
tobi

Field Summary
static int MAX_FILES
           
static int MAX_FOLDERS
           
 
Constructor Summary
RecentFiles(java.util.prefs.Preferences prefs, javax.swing.JMenu fileMenu, java.awt.event.ActionListener listener)
          Creates a new instance of RecentFiles
 
Method Summary
 void addFile(java.io.File f)
          adds files and their containing folders to list of recent files.
 void removeFile(java.io.File f)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAX_FILES

public static final int MAX_FILES
See Also:
Constant Field Values

MAX_FOLDERS

public static final int MAX_FOLDERS
See Also:
Constant Field Values
Constructor Detail

RecentFiles

public RecentFiles(java.util.prefs.Preferences prefs,
                   javax.swing.JMenu fileMenu,
                   java.awt.event.ActionListener listener)
Creates a new instance of RecentFiles

Parameters:
prefs - the Preferences node to store recent files in
fileMenu - the File mane to load with recent files. The menu is added just before the end, presumed to be Exit
listener - the MenuListener to call when one of the items is selected
Method Detail

addFile

public void addFile(java.io.File f)
adds files and their containing folders to list of recent files. List is pruned if too long.

Parameters:
f - a file to add

removeFile

public void removeFile(java.io.File f)

jAER project on SourceForge