|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.freehep.swing.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(String type)
Create a recent file list. |
|
RecentFileList(String type,
int size)
Create a recent file list with a given type and size |
|
| Method Summary | |
|---|---|
void |
actionPerformed(ActionEvent e)
|
void |
add(File f)
Add a file to the list |
void |
add(String name)
Add a file to the list |
void |
addActionListener(ActionListener l)
|
void |
buildMenu(JMenu menu)
Adds the recent file list to a menu. |
protected void |
fireActionPerformed(ActionEvent e)
An action event is fired when the user selects one of the files from a menu. |
void |
load(Properties props)
Load the recent file list from a Properties set |
void |
remove(File f)
Remove a file from the list |
void |
remove(String name)
Remove a file from the list |
void |
removeActionListener(ActionListener l)
|
void |
save(Properties props)
Save the recent file list in a Properties set |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, 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(String type)
type - The prefix to use
public RecentFileList(String type,
int size)
type - The prefix to usesize - the maximum number of files to remember| Method Detail |
|---|
public void addActionListener(ActionListener l)
public void removeActionListener(ActionListener l)
protected void fireActionPerformed(ActionEvent e)
public void actionPerformed(ActionEvent e)
actionPerformed in interface ActionListenerpublic void save(Properties props)
props - The Properties set to save the files inpublic void load(Properties props)
props - The Properties set to load frompublic void add(File f)
f - The file to addpublic void remove(File f)
f - Remove a file from the listpublic void add(String name)
name - The name of the file to addpublic void remove(String name)
name - The name of the file to removepublic void buildMenu(JMenu menu)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||