|
Cytoscape 2.6.2 (c) 2006,2007 ISB, MSKCC, UCSD | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cytoscape.util.FileUtil
public abstract class 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(Component parent,
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(Component parent,
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 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)
DOCUMENT ME! |
static InputStream |
getInputStream(String name,
TaskMonitor monitor)
DOCUMENT ME! |
static String |
getInputString(InputStream inputStream)
|
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(Component parent, String title, int load_save_custom, CyFileFilter[] filters)
parent
- the parent component of the JFileChooser dialogtitle
- 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 File[] getFiles(Component parent, String title, int load_save_custom, CyFileFilter[] filters, String start_dir, String custom_approve_text, boolean multiselect)
parent
- the parent of the JFileChooser dialogtitle
- 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)
name
- DOCUMENT ME!
public static InputStream getInputStream(String name, TaskMonitor monitor)
name
- DOCUMENT ME!monitor
- DOCUMENT ME!
public static String getInputString(String filename)
filename
- File to read in
public static String getInputString(InputStream inputStream) throws IOException
inputStream
- An InputStream
IOException
|
www.cytoscape.org | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |