|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.obolibrary.gui.SelectDialog
public abstract class SelectDialog
Wrapper for the native 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).
Field Summary | |
---|---|
static boolean |
LOAD
|
static boolean |
SAVE
|
Constructor Summary | |
---|---|
SelectDialog()
|
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final boolean LOAD
public static final boolean SAVE
Constructor Detail |
---|
public SelectDialog()
Method Detail |
---|
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)
frame
- the owner frame used to configure the dialogwrite
- write mode, see LOAD
and SAVE
.defaultFolder
- default folder the dialogtitle
- title string for the dialogdescription
- filter descriptionextensions
- suffixes for the filter, set to null to show all files
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 dialog
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |