treebolic.commons
Class FileDialogs

java.lang.Object
  extended by treebolic.commons.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 thePropertyFileFilter
          XSL file filter
private static javax.swing.filechooser.FileFilter theXmlFileFilter
          XML file filter
private static javax.swing.filechooser.FileFilter theXslFileFilter
          XSL 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 getPropertyFile(java.lang.String thisCurrentDirectory)
          Get property file
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
static java.lang.String getXslUrl(java.lang.String thisCurrentDirectory)
          Get XSL 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


theXslFileFilter

private static javax.swing.filechooser.FileFilter theXslFileFilter
XSL file filter


thePropertyFileFilter

private static javax.swing.filechooser.FileFilter thePropertyFileFilter
XSL 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

getPropertyFile

public static java.lang.String getPropertyFile(java.lang.String thisCurrentDirectory)
Get property file

Parameters:
thisCurrentDirectory - current directory
Returns:
string for property file

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

getXslUrl

public static java.lang.String getXslUrl(java.lang.String thisCurrentDirectory)
Get XSL url

Parameters:
thisCurrentDirectory - current directory
Returns:
string for XSL 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