nl.nikhef.slcshttps.gui
Class FilePopup
java.lang.Object
nl.nikhef.slcshttps.gui.FilePopup
public class FilePopup
- extends Object
Static class to let the user choose a file using a JFileChooser
.
- Version:
- 0.1
- Author:
- Mischa Sallé
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FilePopup
public FilePopup()
getFile
public static String getFile(String ext,
String extName,
String title)
throws IOException
- Shows a file chooser popup window (
JFileChooser
) in the default
directory for the user.
- Parameters:
ext
- filename extension to filter with, case insensitiveextName
- text describing the filename extensiontitle
- popup title
- Returns:
- String describing the full path of the chosen file (can be
null
)
- Throws:
IOException
- upon failure, including an unreadable file- See Also:
getFile(String,String,String,String)
getFile
public static String getFile(String ext,
String extName,
String title,
String dir)
throws IOException
- Shows a file chooser popup window (
JFileChooser
) in the specified
directory.
- Parameters:
ext
- filename extension to filter with, case insensitiveextName
- text describing the filename extensiontitle
- popup titledir
- starting directory, when null
use default for the
user.
- Returns:
- String describing the full path of the chosen file (can be
null
)
- Throws:
IOException
- upon failure, including an unreadable file
nl.nikhef.slcshttps
| Mischa Sallé - msalle(AT)nikhef.nl
|