public class EZFileManager extends Object
Modifier and Type | Method and Description |
---|---|
static File |
chooseDirectory()
Manages a File Chooser to choose a directory.
|
static File |
chooseDirectory(Component parent,
String dialogTitle,
EZFileFilter ff)
Manages a File Chooser to choose a directory.
|
static File |
chooseDirectory(String dialogTitle)
Manages a File Chooser to choose a directory.
|
static File |
chooseDirectory(String dialogTitle,
EZFileFilter ff)
Manages a File Chooser to choose a directory.
|
static File |
chooseFileForOpenAction()
Manages a File Chooser to choose a file for open operations.
|
static File |
chooseFileForOpenAction(Component parent,
String dialogTitle,
EZFileFilter ff)
Manages a File Chooser to choose a file for open operations.
|
static File |
chooseFileForOpenAction(String dialogTitle)
Manages a File Chooser to choose a file for open operations.
|
static File |
chooseFileForOpenAction(String dialogTitle,
EZFileFilter ff)
Manages a File Chooser to choose a file for open operations.
|
static File |
chooseFileForSaveAction()
Manages a File Chooser to choose a file for save operations.
|
static File |
chooseFileForSaveAction(Component parent,
String dialogTitle,
EZFileFilter ff)
Manages a File Chooser to choose a file for save operations.
|
static File |
chooseFileForSaveAction(Component parent,
String dialogTitle,
EZFileFilter ff,
List<com.plealog.genericapp.implem.file.EZFileExtDescriptor> types)
Manages a File Chooser to choose a file for save operations.
|
static File |
chooseFileForSaveAction(String dialogTitle)
Manages a File Chooser to choose a file for save operations.
|
static File |
chooseFileForSaveAction(String dialogTitle,
EZFileFilter ff)
Manages a File Chooser to choose a file for save operations.
|
static String |
getDefaultPath()
Returns the default directory path.
|
static String |
getUserHomeDirectory()
Gets the user home directory.
|
static boolean |
isUsingOSNativeFileDialog()
Figures out whether or not this manager uses native OS dependent FileChooser.
|
static void |
setDefaultPath(String path)
Changes the default directory used in
File Chooser dialogue boxes.
|
static void |
useOSNativeFileDialog(boolean useNativeOSFileDialog)
Figures out whether or not this manager will use native OS dependent FileChooser.
|
public static void useOSNativeFileDialog(boolean useNativeOSFileDialog)
useNativeOSFileDialog
- passes in true to use FileDialog
, false to use JFileChooser
.
The former enables the display of an OS-dependent File Chooser, while the latter is the Java Swing specific File CHooser.public static boolean isUsingOSNativeFileDialog()
public static String getDefaultPath()
public static void setDefaultPath(String path)
public static String getUserHomeDirectory()
public static File chooseFileForOpenAction()
public static File chooseFileForOpenAction(String dialogTitle)
dialogTitle
- title of the dialogue boxpublic static File chooseFileForOpenAction(String dialogTitle, EZFileFilter ff)
dialogTitle
- title of the dialogue boxff
- a file filter. Use EZFileTypes
to manage file filters.public static File chooseFileForOpenAction(Component parent, String dialogTitle, EZFileFilter ff)
parent
- the parent component of the File ChooserdialogTitle
- title of the dialogue boxff
- a file filter. Use EZFileTypes
to manage file filters.public static File chooseFileForSaveAction()
public static File chooseFileForSaveAction(String dialogTitle)
dialogTitle
- title of the dialogue boxpublic static File chooseFileForSaveAction(String dialogTitle, EZFileFilter ff)
dialogTitle
- title of the dialogue boxff
- a file filter. Use EZFileTypes
to manage file filters.public static File chooseFileForSaveAction(Component parent, String dialogTitle, EZFileFilter ff)
parent
- the parent component of the File ChooserdialogTitle
- title of the dialogue boxff
- a file filter. Use EZFileTypes
to manage file filters.public static File chooseFileForSaveAction(Component parent, String dialogTitle, EZFileFilter ff, List<com.plealog.genericapp.implem.file.EZFileExtDescriptor> types)
parent
- the parent component of the File ChooserdialogTitle
- title of the dialogue boxff
- a file filter. Use EZFileTypes
to manage file filters.types
- list of file types to restrict display of the dialog box to thempublic static File chooseDirectory()
public static File chooseDirectory(String dialogTitle)
dialogTitle
- title of the dialogue boxpublic static File chooseDirectory(String dialogTitle, EZFileFilter ff)
dialogTitle
- title of the dialogue boxff
- a file filter. Use EZFileTypes
to manage file filters.public static File chooseDirectory(Component parent, String dialogTitle, EZFileFilter ff)
parent
- the parent component of the File ChooserdialogTitle
- title of the dialogue boxff
- a file filter. Use EZFileTypes
to manage file filters.Plealog Software - 2003-2017