Cytoscape 2.2 (c) 2004 ISB, MSKCC, UCSD

cytoscape.util
Class FileUtil

java.lang.Object
  extended bycytoscape.util.FileUtil

public abstract class FileUtil
extends Object

Provides a platform-dependent way to open files. Mainly because Mac would prefer that you use java.awt.FileDialog instead of the Swing FileChooser.


Field Summary
static int CUSTOM
           
static int LOAD
           
static int SAVE
           
 
Constructor Summary
FileUtil()
           
 
Method Summary
static File getFile(String title, int load_save_custom)
          Returns a File object, this method should be used instead of rolling your own JFileChooser.
static File getFile(String title, int load_save_custom, CyFileFilter[] filters)
          Returns a File object, this method should be used instead of rolling your own JFileChooser.
static File getFile(String title, int load_save_custom, CyFileFilter[] filters, String start_dir, String custom_approve_text)
          Returns a File object, this method should be used instead of rolling your own JFileChooser.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOAD

public static int LOAD

SAVE

public static int SAVE

CUSTOM

public static int CUSTOM
Constructor Detail

FileUtil

public FileUtil()
Method Detail

getFile

public static File getFile(String title,
                           int load_save_custom)
Returns a File object, this method should be used instead of rolling your own JFileChooser.

Parameters:
title - the title of the dialog box
load_save_custom - a flag for the type of file dialog
Returns:
the location of the selcted file

getFile

public static File getFile(String title,
                           int load_save_custom,
                           CyFileFilter[] filters)
Returns a File object, this method should be used instead of rolling your own JFileChooser.

Parameters:
title - the title of the dialog box
load_save_custom - a flag for the type of file dialog
filters - an array of CyFileFilters that let you filter based on extension
Returns:
the location of the selcted file

getFile

public static File getFile(String title,
                           int load_save_custom,
                           CyFileFilter[] filters,
                           String start_dir,
                           String custom_approve_text)
Returns a File object, this method should be used instead of rolling your own JFileChooser.

Parameters:
title - the title of the dialog box
load_save_custom - a flag for the type of file dialog
filters - an array of CyFileFilters that let you filter based on extension
start_dir - an alternate start dir, if null the default cytoscape MUD will be used
custom_approve_text - if this is a custom dialog, then custom text should be on the approve button.
Returns:
the location of the selcted file

www.cytoscape.org