public class LoadSaveDialogs extends Object
Modifier and Type | Field and Description |
---|---|
static File |
initialLoadDirectory
the initial directory for loading files
|
static File |
initialSaveDirectory
the initial directory for storing files
|
Constructor and Description |
---|
LoadSaveDialogs() |
Modifier and Type | Method and Description |
---|---|
static File |
showDirectoryDialog(Window owner)
Shows a dialog tied to the owner window for selecting a directory.
|
static File |
showLoadDialog(Window owner,
String fileDescription,
String... fileExtensions)
Shows a load dialog tied to the owner window with a given description and an array of allowed file extensions.
|
static File |
showSaveDialog(Window owner,
String initialFileName,
String fileDescription,
String... fileExtensions)
Shows a save dialog tied to the owner window with a given description and an array of allowed file extensions.
|
public static File initialLoadDirectory
public static File initialSaveDirectory
public static File showLoadDialog(Window owner, String fileDescription, String... fileExtensions)
owner
- the owner window, may be null
fileDescription
- the description of allowed filesfileExtensions
- the extensions of allowed filesFile
or null if no file has been selectedpublic static File showSaveDialog(Window owner, String initialFileName, String fileDescription, String... fileExtensions)
owner
- the owner window, may be null
initialFileName
- the initial file name for savingfileDescription
- the description of allowed filesfileExtensions
- the extensions of allowed filesFile
or null if no file has been selected