cytoscape.util
Class FileUtil
java.lang.Object
cytoscape.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.
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. |
LOAD
public static int LOAD
SAVE
public static int SAVE
CUSTOM
public static int CUSTOM
FileUtil
public FileUtil()
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 boxload_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 boxload_save_custom
- a flag for the type of file dialogfilters
- 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 boxload_save_custom
- a flag for the type of file dialogfilters
- an array of CyFileFilters that let you filter
based on extensionstart_dir
- an alternate start dir, if null the default
cytoscape MUD will be usedcustom_approve_text
- if this is a custom dialog, then
custom text should be on the approve
button.
- Returns:
- the location of the selcted file