Apache JMeter

org.apache.jmeter.gui.util
Class FileDialoger

java.lang.Object
  extended by org.apache.jmeter.gui.util.FileDialoger

public final class FileDialoger
extends java.lang.Object

Class implementing a file open dialogue


Method Summary
static javax.swing.JFileChooser promptToOpenFile()
           
static javax.swing.JFileChooser promptToOpenFile(java.lang.String[] exts)
          Prompts the user to choose a file from their filesystems for our own devious uses.
static javax.swing.JFileChooser promptToSaveFile(java.lang.String filename)
          Prompts the user to choose a file from their filesystems for our own devious uses.
static javax.swing.JFileChooser promptToSaveFile(java.lang.String filename, java.lang.String[] extensions)
          Get a JFileChooser with a new FileFilter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

promptToOpenFile

public static javax.swing.JFileChooser promptToOpenFile(java.lang.String[] exts)
Prompts the user to choose a file from their filesystems for our own devious uses. This method maintains the last directory the user visited before dismissing the dialog. This does NOT imply they actually chose a file from that directory, only that they closed the dialog there. It is the caller's responsibility to check to see if the selected file is non-null.

Returns:
the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen

promptToOpenFile

public static javax.swing.JFileChooser promptToOpenFile()

promptToSaveFile

public static javax.swing.JFileChooser promptToSaveFile(java.lang.String filename)
Prompts the user to choose a file from their filesystems for our own devious uses. This method maintains the last directory the user visited before dismissing the dialog. This does NOT imply they actually chose a file from that directory, only that they closed the dialog there. It is the caller's responsibility to check to see if the selected file is non-null.

Returns:
the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
See Also:
promptToOpenFile()

promptToSaveFile

public static javax.swing.JFileChooser promptToSaveFile(java.lang.String filename,
                                                        java.lang.String[] extensions)
Get a JFileChooser with a new FileFilter.

Parameters:
filename - file name
extensions - list of extensions
Returns:
the FileChooser - null if no file was chosen

Apache JMeter

Copyright © 1998-2010 Apache Software Foundation. All Rights Reserved.