net.sf.jaer.util
Class RecentFiles
java.lang.Object
net.sf.jaer.util.RecentFiles
public class RecentFiles
- extends java.lang.Object
Keeps track of recent files used (e.g. in BiasgenFrame)
- Author:
- tobi
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 |
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
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 infileMenu
- the File mane to load with recent files. The menu is added just before the end, presumed to be Exitlistener
- the MenuListener to call when one of the items is selected
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)