org.scijava.io
Class DefaultRecentFileService
java.lang.Object
org.scijava.AbstractContextual
org.scijava.plugin.AbstractRichPlugin
org.scijava.service.AbstractService
org.scijava.io.DefaultRecentFileService
- All Implemented Interfaces:
- Comparable<Prioritized>, Contextual, Disposable, RecentFileService, HasPluginInfo, RichPlugin, SciJavaPlugin, Prioritized, SciJavaService, Service
public final class DefaultRecentFileService
- extends AbstractService
- implements RecentFileService
Default service for managing the Recently Used Files menu.
Behavior: There is a limited number of files presented (maxFilesShown),
regardless of the list length. When a file is opened, its path is added to
the top of the list. If an image has been saved as a new file, its path is
added to the top of the list.
- add(String path)
- remove(String path)
- Author:
- Grant Harris, Curtis Rueden
Method Summary |
void |
add(String path)
Adds or refreshes a path on the list of recent files. |
void |
clear()
Clears the list of recent files. |
List<String> |
getRecentFiles()
Gets the list of recent files. |
void |
initialize()
Performs any needed initialization when the service is first loaded. |
protected void |
onEvent(IOEvent event)
|
boolean |
remove(String path)
Removes a path from the list of recent files. |
DefaultRecentFileService
public DefaultRecentFileService()
add
public void add(String path)
- Description copied from interface:
RecentFileService
- Adds or refreshes a path on the list of recent files.
- Specified by:
add
in interface RecentFileService
remove
public boolean remove(String path)
- Description copied from interface:
RecentFileService
- Removes a path from the list of recent files.
- Specified by:
remove
in interface RecentFileService
clear
public void clear()
- Description copied from interface:
RecentFileService
- Clears the list of recent files.
- Specified by:
clear
in interface RecentFileService
getRecentFiles
public List<String> getRecentFiles()
- Description copied from interface:
RecentFileService
- Gets the list of recent files.
- Specified by:
getRecentFiles
in interface RecentFileService
initialize
public void initialize()
- Description copied from interface:
Service
- Performs any needed initialization when the service is first loaded.
NB: This method is not intended to be called directly. It is called by
the service framework itself (specifically by the ServiceHelper
)
when initializing the service. It should not be called a second time.
- Specified by:
initialize
in interface Service
- Overrides:
initialize
in class AbstractService
onEvent
protected void onEvent(IOEvent event)
Copyright © 2009–2014 SciJava. All rights reserved.