nl.nikhef.slcshttps.gui
Class FilePopup

java.lang.Object
  extended by 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é

Constructor Summary
FilePopup()
           
 
Method Summary
static String getFile(String ext, String extName, String title)
          Shows a file chooser popup window (JFileChooser) in the default directory for the user.
static String getFile(String ext, String extName, String title, String dir)
          Shows a file chooser popup window (JFileChooser) in the specified directory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FilePopup

public FilePopup()
Method Detail

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 insensitive
extName - text describing the filename extension
title - 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 insensitive
extName - text describing the filename extension
title - popup title
dir - 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