public interface FileUtil
Module: swing-util-api
To use this in your app, include the following dependency in your POM:
<dependency> <groupId>org.cytoscape</groupId> <artifactId>swing-util-api</artifactId> </dependency>
Modifier and Type | Field and Description |
---|---|
static int |
CUSTOM
Equal to FileDialog.LOAD + FileDialog.SAVE.
|
static String |
LAST_DIRECTORY
Deprecated.
|
static int |
LOAD
Equal to FileDialog.LOAD.
|
static int |
SAVE
Equal to FileDialog.SAVE.
|
static String |
urlPattern
A string that defines a simplified java regular expression for a URL.
|
Modifier and Type | Method and Description |
---|---|
File |
getFile(Component parent,
String title,
int loadSaveCustom,
Collection<FileChooserFilter> filters)
Returns a File object, this method should be used instead
of rolling your own JFileChooser.
|
File |
getFile(Component parent,
String title,
int loadSaveCustom,
String startDir,
String customApproveText,
Collection<FileChooserFilter> filters)
Returns a File object, this method should be used instead
of rolling your own JFileChooser.
|
File |
getFile(Component parent,
String title,
int loadSaveCustom,
String startDir,
String fileName,
String customApproveText,
Collection<FileChooserFilter> filters)
Returns a File object, this method should be used instead
of rolling your own JFileChooser.
|
File[] |
getFiles(Component parent,
String title,
int loadSaveCustom,
Collection<FileChooserFilter> filters)
Returns an array of File objects, this method should be used instead
of rolling your own JFileChooser.
|
File[] |
getFiles(Component parent,
String title,
int loadSaveCustom,
String startDir,
String customApproveText,
boolean multiselect,
Collection<FileChooserFilter> filters)
Returns a list of File objects, this method should be used instead
of rolling your own JFileChooser.
|
File[] |
getFiles(Component parent,
String title,
int loadSaveCustom,
String startDir,
String customApproveText,
Collection<FileChooserFilter> filters)
Returns a list of File objects, this method should be used instead
of rolling your own JFileChooser.
|
File[] |
getFiles(Component parent,
String title,
int loadSaveCustom,
String startDir,
String fileName,
String customApproveText,
boolean multiselect,
Collection<FileChooserFilter> filters)
Returns a list of File objects, this method should be used instead
of rolling your own JFileChooser.
|
File |
getFolder(Component parent,
String title,
String startDir)
Returns a File object representing a folder, this method should be used instead
of rolling your own JFileChooser.
|
@Deprecated static final String LAST_DIRECTORY
static final int LOAD
static final int SAVE
static final int CUSTOM
static final String urlPattern
File getFile(Component parent, String title, int loadSaveCustom, Collection<FileChooserFilter> filters)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxloadSaveCustom
- a flag for the type of file dialogfilters
- a non-empty collection of file filtersFile getFile(Component parent, String title, int loadSaveCustom, String startDir, String customApproveText, Collection<FileChooserFilter> filters)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxloadSaveCustom
- a flag for the type of file dialogstartDir
- an alternate start dir, if null the default
Cytoscape MUD will be usedcustomApproveText
- if this is a custom dialog, then
custom text should be on the approve
button.filters
- a non-empty collection of file filtersFile getFile(Component parent, String title, int loadSaveCustom, String startDir, String fileName, String customApproveText, Collection<FileChooserFilter> filters)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxloadSaveCustom
- a flag for the type of file dialogstartDir
- an alternate start dir, if null the default
Cytoscape MUD will be usedfileName
- a suggested file name to usecustomApproveText
- if this is a custom dialog, then
custom text should be on the approve
button.filters
- a non-empty collection of file filtersFile[] getFiles(Component parent, String title, int loadSaveCustom, Collection<FileChooserFilter> filters)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxloadSaveCustom
- a flag for the type of file dialogfilters
- a non-empty collection of file filtersFile[] getFiles(Component parent, String title, int loadSaveCustom, String startDir, String customApproveText, Collection<FileChooserFilter> filters)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxloadSaveCustom
- a flag for the type of file dialogstartDir
- an alternate start dir, if null the default
Cytoscape MUD will be usedcustomApproveText
- if this is a custom dialog, then
custom text should be on the approve
button.filters
- a non-empty collection of file filtersFile[] getFiles(Component parent, String title, int loadSaveCustom, String startDir, String customApproveText, boolean multiselect, Collection<FileChooserFilter> filters)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxloadSaveCustom
- a flag for the type of file dialogstartDir
- an alternate start dir, if null the default
cytoscape MUD will be usedcustomApproveText
- 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?)filters
- a non-empty collection of file filtersFile[] getFiles(Component parent, String title, int loadSaveCustom, String startDir, String fileName, String customApproveText, boolean multiselect, Collection<FileChooserFilter> filters)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxloadSaveCustom
- a flag for the type of file dialogstartDir
- an alternate start dir, if null the default
cytoscape MUD will be usedfileName
- a suggested file name to usecustomApproveText
- 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?)filters
- a non-empty collection of file filtersFile getFolder(Component parent, String title, String startDir)
parent
- the parent of the JFileChooser or FileDialogtitle
- the title of the dialog boxstartDir
- an alternate start dir, if null the default Cytoscape MUD will be usedCopyright 2011-2015 Cytoscape Consortium. All rights reserved.