public abstract class SelectDialog extends Object
FileDialog
. Allow convenient use of the native
Dialog. The wrapper sets also the system specific flags, for file and folder
dialogs. Limitations:
JFileChooser
is used (Fixed
in Java7).Modifier and Type | Field and Description |
---|---|
static boolean |
LOAD |
static boolean |
SAVE |
Constructor and Description |
---|
SelectDialog() |
Modifier and Type | Method and Description |
---|---|
static SelectDialog |
getFileSelector(Frame frame,
boolean write,
String defaultFolder,
String title,
String description,
String[] extensions)
Create a new dialog, which selects a file from the file system.
|
static SelectDialog |
getFolderSelector(Frame frame,
String defaultFolder,
String title)
Create a new dialog, which selects a folder from the file system.
|
abstract File |
getSelected()
Retrieve the selected file/folder.
|
String |
getSelectedCanonicalPath()
Retrieve the canonical path of the selected folder.
|
abstract void |
show()
Show the dialog to the user for selection.
|
public static final boolean LOAD
public static final boolean SAVE
public abstract void show()
public abstract File getSelected()
public String getSelectedCanonicalPath()
public static SelectDialog getFileSelector(Frame frame, boolean write, String defaultFolder, String title, String description, String[] extensions)
public static SelectDialog getFolderSelector(Frame frame, String defaultFolder, String title)
frame
- the frame used to center the dialogdefaultFolder
- default folder for the dialogtitle
- title string for the dialogCopyright © 2010-2014. All Rights Reserved.