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 Type
    Method
    Description
    void
    add(URL newURL)
    Adds "newURL" to the list of recently opened file names and trims the list if it has exceeded its maximum length.
    void
    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
    remove(URL url)
    Removes the passed URL from the list of recently opened file names.
    void
    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

      List<URL> getRecentlyOpenedURLs()
      Returns the current list of recently opened file names.
      Returns:
      the current list of recently opened file names
    • add

      void add(URL newURL)
      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

      void remove(URL url)
      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

      void writeOut() throws FileNotFoundException
      Writes the list of recently opened files to the file specified by the constructor argument.
      Throws:
      FileNotFoundException