corina.gui
Class FileDialog
java.lang.Object
|
+--corina.gui.FileDialog
- public class FileDialog
- extends Object
A convenient wrapper for JFileChooser, for typical XCorina usage.
Here's what they provide, and why you'd want to use this class
over JFileChooser directly:
- automatically uses a bunch of default filters
- gets its initial directory from corina.dir.data; subsequent
calls start from the last-used-directory
- incredibly neat preview component
- multiple-file-chooser lets the user select several
files from one dialog
- simple return values: null, or a String, or a List of
Strings. No need to mess with JFileChooser.APPROVE_OPTION
- Version:
- $Id: FileDialog.java,v 1.3 2002/10/31 17:02:53 bitpoet Exp $
- Author:
- Ken Harris
Field Summary |
static String[] |
FILTERS
The default list of filters to use, as a list of extensions;
the names of these are in FileDialogBundle. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FILTERS
public static String[] FILTERS
- The default list of filters to use, as a list of extensions;
the names of these are in FileDialogBundle.
FileDialog
public FileDialog()
getWorkingDirectory
public static String getWorkingDirectory()
showSingle
public static String showSingle(String prompt)
throws UserCancelledException
- Show a file selection dialog. This allows the user to select
one file. It shows a preview component, and has the default
filters available.
- Parameters:
prompt
- the text string to use for both the title bar
and approve button- Returns:
- the filename that was selected, or null if the user
cancelled
showMulti
public static List showMulti(String prompt)
throws UserCancelledException
showMulti
public static List showMulti(String prompt,
List list)
throws UserCancelledException