public final class FileDialoger extends Object
Modifier and Type | Method and Description |
---|---|
static String |
getLastJFCDirectory() |
static JFileChooser |
promptToCorrelationFile(String[] exts)
Get a JFileChooser to choose files with provided extensions
|
static JFileChooser |
promptToOpenFile()
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToOpenFile(Component parentComponent,
String[] exts,
String existingFileName,
boolean onlyDirectories)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToOpenFile(String existingFileName)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToOpenFile(String[] exts)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToOpenFile(String[] exts,
String existingFileName)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToOpenFile(String[] exts,
String existingFileName,
boolean onlyDirectories)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToOpenFile(String existingFileName,
boolean onlyDirectories)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToOpenRuleFile(String[] exts)
Get a JFileChooser to choose files with provided extensions
|
static JFileChooser |
promptToSaveFile(String filename)
Prompts the user to choose a file from their filesystems for our own
devious uses.
|
static JFileChooser |
promptToSaveFile(String filename,
String[] extensions)
Get a JFileChooser with a new FileFilter.
|
static void |
setLastJFCDirectory(String lastJFCDirectory) |
public static JFileChooser promptToOpenFile()
public static JFileChooser promptToOpenFile(String existingFileName)
existingFileName
- The name of a file with path. If the filename points
to an existing file, the directory in which it lies, will be used
as the starting point for the returned JFileChooser.public static JFileChooser promptToOpenFile(String existingFileName, boolean onlyDirectories)
existingFileName
- The name of a file with path. If the filename points
to an existing file, the directory in which it lies, will be used
as the starting point for the returned JFileChooser.onlyDirectories
- If true, only directories are displayed in the FileChooserpublic static JFileChooser promptToOpenFile(String[] exts)
exts
- The list of allowed file extensions. If empty, any
file extension is allowedpublic static JFileChooser promptToOpenFile(String[] exts, String existingFileName)
exts
- The list of allowed file extensions. If empty, any
file extension is allowedexistingFileName
- The name of a file with path. If the filename points
to an existing file, the directory in which it lies, will be used
as the starting point for the returned JFileChooser.public static JFileChooser promptToOpenFile(String[] exts, String existingFileName, boolean onlyDirectories)
exts
- The list of allowed file extensions. If empty, any
file extension is allowedexistingFileName
- The name of a file with path. If the filename points
to an existing file, the directory in which it lies, will be used
as the starting point for the returned JFileChooser.onlyDirectories
- If true, only directories are displayed in the FileChooserpublic static JFileChooser promptToOpenFile(Component parentComponent, String[] exts, String existingFileName, boolean onlyDirectories)
parentComponent
- Component parent of current elementexts
- The list of allowed file extensions. If empty, any
file extension is allowedexistingFileName
- The name of a file with path. If the filename points
to an existing file, the directory in which it lies, will be used
as the starting point for the returned JFileChooser.onlyDirectories
- If true, only directories are displayed in the FileChooserpublic static JFileChooser promptToSaveFile(String filename)
filename
- The name of a file with path. If the filename points
to an existing file, the directory in which it lies, will be used
as the starting point for the returned JFileChooser.promptToOpenFile()
public static JFileChooser promptToSaveFile(String filename, String[] extensions)
filename
- file nameextensions
- list of extensionspublic static JFileChooser promptToCorrelationFile(String[] exts)
exts
- file extension arraypublic static JFileChooser promptToOpenRuleFile(String[] exts)
exts
- file extension arraypublic static String getLastJFCDirectory()
public static void setLastJFCDirectory(String lastJFCDirectory)
lastJFCDirectory
- The last directory visited by the user while choosing FilesCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.