|
Cytoscape 2.3.1 (c) 2004 ISB, MSKCC, UCSD | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcytoscape.util.FileUtil
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
|
static String |
urlPattern
A string that defines a simplified java regular expression for a URL. |
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. |
static File[] |
getFiles(String title,
int load_save_custom,
CyFileFilter[] filters)
Returns an array of File objects, this method should be used instead of rolling your own JFileChooser. |
static File[] |
getFiles(String title,
int load_save_custom,
CyFileFilter[] filters,
String start_dir,
String custom_approve_text)
Returns a list of File objects, this method should be used instead of rolling your own JFileChooser. |
static File[] |
getFiles(String title,
int load_save_custom,
CyFileFilter[] filters,
String start_dir,
String custom_approve_text,
boolean multiselect)
Returns a list of File objects, this method should be used instead of rolling your own JFileChooser. |
static InputStream |
getInputStream(String name)
|
static InputStream |
getInputStream(String name,
cytoscape.task.TaskMonitor monitor)
|
static String |
getInputString(String filename)
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static int LOAD
public static int SAVE
public static int CUSTOM
public static final String urlPattern
Constructor Detail |
public FileUtil()
Method Detail |
public static File getFile(String title, int load_save_custom)
title
- the title of the dialog boxload_save_custom
- a flag for the type of file dialog
public static File getFile(String title, int load_save_custom, CyFileFilter[] filters)
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
public static File getFile(String title, int load_save_custom, CyFileFilter[] filters, String start_dir, String custom_approve_text)
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.
public static File[] getFiles(String title, int load_save_custom, CyFileFilter[] filters)
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
public static File[] getFiles(String title, int load_save_custom, CyFileFilter[] filters, String start_dir, String custom_approve_text)
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.
public static File[] getFiles(String title, int load_save_custom, CyFileFilter[] filters, String start_dir, String custom_approve_text, boolean multiselect)
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.multiselect
- Enable selection of multiple files (Macs are
still limited to a single file because we use
FileDialog there -- is this fixed in Java 1.5?)
public static InputStream getInputStream(String name)
public static InputStream getInputStream(String name, cytoscape.task.TaskMonitor monitor)
public static String getInputString(String filename)
|
www.cytoscape.org | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |