Cytoscape 2.8.0 API

cytoscape.util
Class RecentlyOpenedTracker

java.lang.Object
  extended by cytoscape.util.RecentlyOpenedTracker

public class RecentlyOpenedTracker
extends Object

A class to keep track of a short list of recently opened URLs.


Constructor Summary
RecentlyOpenedTracker(String trackerFileName)
          Creates a "recently opened" file tracker.
 
Method Summary
 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.
 URL getMostRecentAddition()
           
 List<URL> getRecentlyOpenedURLs()
           
 void writeOut()
          Writes the list of recently opened files to the file specified by the constructor argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecentlyOpenedTracker

public RecentlyOpenedTracker(String trackerFileName)
                      throws IOException
Creates a "recently opened" file tracker.

Parameters:
trackerFileName - the name of the file in the Cytoscape config directory to read saved file names from.
Throws:
IOException
Method Detail

getRecentlyOpenedURLs

public List<URL> getRecentlyOpenedURLs()

add

public 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.


writeOut

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

Throws:
FileNotFoundException

getMostRecentAddition

public URL getMostRecentAddition()
Returns:
the last addition or null if there are no URLs

Cytoscape 2.8.0 API

Copyright 2010 Cytoscape Consortium. All rights reserved.