edu.princeton.wordnet.client.browser.component
Class FileDialogs

java.lang.Object
  extended by edu.princeton.wordnet.client.browser.component.FileDialogs

public class FileDialogs
extends java.lang.Object

File dialog utilities

Author:
Bernard Bou

Nested Class Summary
(package private) static class FileDialogs.XFileFilter
          Extended file filter
 
Field Summary
private static javax.swing.filechooser.FileFilter theExecutableFileFilter
          Executable file filter
private static javax.swing.filechooser.FileFilter theXmlFileFilter
          XML file filter
 
Constructor Summary
FileDialogs()
           
 
Method Summary
static java.lang.String getExec(java.lang.String thisCurrentDirectory)
          Get executable
static java.lang.String getFolder(java.lang.String thisCurrentDirectory)
          Get directory
static java.lang.String getXml(java.lang.String thisCurrentDirectory)
          Get XML file path
static java.lang.String getXmlUrl(java.lang.String thisCurrentDirectory)
          Get XML url
private static javax.swing.JFileChooser makeFileChooser()
          Make file chooser
private static javax.swing.JFileChooser makeFolderChooser()
          Make folder chooser
private static void setCurrentDirectory(javax.swing.JFileChooser thisChooser, java.lang.String thisCurrentDirectory)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theExecutableFileFilter

private static javax.swing.filechooser.FileFilter theExecutableFileFilter
Executable file filter


theXmlFileFilter

private static javax.swing.filechooser.FileFilter theXmlFileFilter
XML file filter

Constructor Detail

FileDialogs

public FileDialogs()
Method Detail

getExec

public static java.lang.String getExec(java.lang.String thisCurrentDirectory)
Get executable

Parameters:
thisCurrentDirectory - current directory
Returns:
string for executable

getXml

public static java.lang.String getXml(java.lang.String thisCurrentDirectory)
Get XML file path

Parameters:
thisCurrentDirectory - current directory
Returns:
string for XML file path

getXmlUrl

public static java.lang.String getXmlUrl(java.lang.String thisCurrentDirectory)
Get XML url

Parameters:
thisCurrentDirectory - current directory
Returns:
string for XML file url

getFolder

public static java.lang.String getFolder(java.lang.String thisCurrentDirectory)
Get directory

Parameters:
thisCurrentDirectory - current directory
Returns:
string for directory path

makeFileChooser

private static javax.swing.JFileChooser makeFileChooser()
Make file chooser

Returns:
file chooser

makeFolderChooser

private static javax.swing.JFileChooser makeFolderChooser()
Make folder chooser

Returns:
folder chooser

setCurrentDirectory

private static void setCurrentDirectory(javax.swing.JFileChooser thisChooser,
                                        java.lang.String thisCurrentDirectory)
Parameters:
thisChooser - file chooser
thisCurrentDirectory - directory to set as current