|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjam.framework.RecentFileList
public class RecentFileList
A class for maintaining a "Recent File List". The recent file list can be stored between program invocations in a properties file. One or more RecentFileLists can easily be embedded in a JMenu.
Constructor Summary | |
---|---|
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 |
Method Summary | |
---|---|
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 |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
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 rememberMethod Detail |
---|
public 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.ActionListener
public 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |