public class RecentFileList
extends java.lang.Object
implements java.awt.event.ActionListener
| Constructor and Description |
|---|
RecentFileList()
Create a RecentFileList
|
RecentFileList(int size)
Create a RecentFileList with a given maximum length
|
RecentFileList(java.lang.String type)
Create a recent file list.
|
RecentFileList(java.lang.String type,
int size)
Create a recent file list with a given type and size
|
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
add(java.io.File f)
Add a file to the list
|
void |
add(java.lang.String name)
Add a file to the list
|
void |
addActionListener(java.awt.event.ActionListener l) |
void |
buildMenu(javax.swing.JMenu menu)
Adds the recent file list to a menu.
|
void |
load(java.util.Properties props)
Load the recent file list from a Properties set
|
void |
remove(java.io.File f)
Remove a file from the list
|
void |
remove(java.lang.String name)
Remove a file from the list
|
void |
removeActionListener(java.awt.event.ActionListener l) |
void |
save(java.util.Properties props)
Save the recent file list in a Properties set
|
public RecentFileList()
public RecentFileList(int size)
size - the maximum number of files to rememberpublic RecentFileList(java.lang.String type)
type - The prefix to usepublic RecentFileList(java.lang.String type,
int size)
type - The prefix to usesize - the maximum number of files to rememberpublic void addActionListener(java.awt.event.ActionListener l)
public void removeActionListener(java.awt.event.ActionListener l)
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void save(java.util.Properties props)
props - The Properties set to save the files inpublic void load(java.util.Properties props)
props - The Properties set to load frompublic void add(java.io.File f)
f - The file to addpublic void remove(java.io.File f)
f - Remove a file from the listpublic void add(java.lang.String name)
name - The name of the file to addpublic void remove(java.lang.String name)
name - The name of the file to removepublic void buildMenu(javax.swing.JMenu menu)
http://code.google.com/p/jam-lib/