public final class FileDialoger
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.String |
getLastJFCDirectory() |
static javax.swing.JFileChooser |
promptToOpenFile()
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToOpenFile(java.awt.Component parentComponent,
java.lang.String[] exts,
java.lang.String existingFileName,
boolean onlyDirectories)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToOpenFile(java.lang.String existingFileName)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToOpenFile(java.lang.String[] exts)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToOpenFile(java.lang.String[] exts,
java.lang.String existingFileName)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToOpenFile(java.lang.String[] exts,
java.lang.String existingFileName,
boolean onlyDirectories)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToOpenFile(java.lang.String existingFileName,
boolean onlyDirectories)
Prompts the user to choose a file or a directory from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToSaveFile(java.lang.String filename)
Prompts the user to choose a file from their filesystems for our own
devious uses.
|
static javax.swing.JFileChooser |
promptToSaveFile(java.lang.String filename,
java.lang.String[] extensions)
Get a JFileChooser with a new FileFilter.
|
static void |
setLastJFCDirectory(java.lang.String lastJFCDirectory) |
public static javax.swing.JFileChooser promptToOpenFile()
public static javax.swing.JFileChooser promptToOpenFile(java.lang.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 javax.swing.JFileChooser promptToOpenFile(java.lang.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 javax.swing.JFileChooser promptToOpenFile(java.lang.String[] exts)
exts
- The list of allowed file extensions. If empty, any
file extension is allowedpublic static javax.swing.JFileChooser promptToOpenFile(java.lang.String[] exts, java.lang.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 javax.swing.JFileChooser promptToOpenFile(java.lang.String[] exts, java.lang.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 javax.swing.JFileChooser promptToOpenFile(java.awt.Component parentComponent, java.lang.String[] exts, java.lang.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 javax.swing.JFileChooser promptToSaveFile(java.lang.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 javax.swing.JFileChooser promptToSaveFile(java.lang.String filename, java.lang.String[] extensions)
filename
- file nameextensions
- list of extensionspublic static java.lang.String getLastJFCDirectory()
public static void setLastJFCDirectory(java.lang.String lastJFCDirectory)
lastJFCDirectory
- The last directory visited by the user while choosing FilesCopyright © 1998-2019 Apache Software Foundation. All Rights Reserved.