Package org.cytoscape.io.util
Interface RecentlyOpenedTracker
public interface RecentlyOpenedTracker
Manages list of recently opened files.
Currently, this is used for tracking recent sessions.
Module: io-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>io-api</artifactId> </dependency>
Cytoscape Backwards Compatibility (API Interface): We expect that this interface will be used but not implemented by developers using this interface. As such, we reserve the right to add methods to the interface as part of minor version upgrades. We will not remove methods for any changes other than major version upgrades.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds "newURL" to the list of recently opened file names and trims the list if it has exceeded its maximum length.void
clear()
Clears the list of recently opened file names.Returns the last addition or null if there are no URLs.Returns the current list of recently opened file names.void
Removes the passed URL from the list of recently opened file names.void
writeOut()
Writes the list of recently opened files to the file specified by the constructor argument.
-
Method Details
-
getMostRecentlyOpenedURL
URL getMostRecentlyOpenedURL()Returns the last addition or null if there are no URLs.- Returns:
- the last addition or null if there are no URLs.
-
getRecentlyOpenedURLs
Returns the current list of recently opened file names.- Returns:
- the current list of recently opened file names
-
add
Adds "newURL" to the list of recently opened file names and trims the list if it has exceeded its maximum length.- Parameters:
newURL
- the URL to add to the list of recently opened file names.
-
remove
Removes the passed URL from the list of recently opened file names.- Parameters:
url
- the URL to be removed.
-
clear
void clear()Clears the list of recently opened file names. -
writeOut
Writes the list of recently opened files to the file specified by the constructor argument.- Throws:
FileNotFoundException
-