com.darwinsys.util
Class RecentItems
java.lang.Object
com.darwinsys.util.RecentItems
public class RecentItems
- extends java.lang.Object
A list of recent items, such as a Recent File Menu, a Recent Choices dropdown, etc.
Method Summary |
void |
clear()
Clear all saved Recent Items from Preferences, from memory, and from the Menu. |
java.util.List<java.lang.String> |
getList()
|
void |
putRecent(java.lang.String f)
Add the given filename to the top of the recent list in Prefs and in menu. |
void |
remove(java.lang.String f)
Remove the given name from the list; does NOT invoke your callback
since it might have been invoked in your callback... |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DEFAULT_MAX_RECENT_FILES
public static final int DEFAULT_MAX_RECENT_FILES
- See Also:
- Constant Field Values
RecentItems
public RecentItems(java.util.prefs.Preferences prefs,
RecentItems.Callback cb,
int max)
RecentItems
public RecentItems(java.util.prefs.Preferences prefs,
RecentItems.Callback cb)
putRecent
public void putRecent(java.lang.String f)
- Add the given filename to the top of the recent list in Prefs and in menu.
It is generally not necessary for user code to call this method!
getList
public java.util.List<java.lang.String> getList()
clear
public void clear()
- Clear all saved Recent Items from Preferences, from memory, and from the Menu.
There is NO UNDO for this so call with care. DOES invoke your callback.
remove
public void remove(java.lang.String f)
- Remove the given name from the list; does NOT invoke your callback
since it might have been invoked in your callback...
Copyright © 1996-2004 Ian F. Darwin. See license.html for usage license.