Package org.apache.jmeter.gui.util
Class FileDialoger
java.lang.Object
org.apache.jmeter.gui.util.FileDialoger
Class implementing a file open dialogue
- 
Method SummaryModifier and TypeMethodDescriptionstatic Stringstatic JFileChooserPrompts the user to choose a file or a directory from their filesystems for our own devious uses.static JFileChooserpromptToOpenFile(Component parentComponent, String[] exts, String existingFileName, boolean onlyDirectories) Prompts the user to choose a file or a directory from their filesystems for our own devious uses.static JFileChooserpromptToOpenFile(String existingFileName) Prompts the user to choose a file or a directory from their filesystems for our own devious uses.static JFileChooserpromptToOpenFile(String[] exts) Prompts the user to choose a file or a directory from their filesystems for our own devious uses.static JFileChooserpromptToOpenFile(String[] exts, String existingFileName) Prompts the user to choose a file or a directory from their filesystems for our own devious uses.static JFileChooserpromptToOpenFile(String[] exts, String existingFileName, boolean onlyDirectories) Prompts the user to choose a file or a directory from their filesystems for our own devious uses.static JFileChooserpromptToOpenFile(String existingFileName, boolean onlyDirectories) Prompts the user to choose a file or a directory from their filesystems for our own devious uses.static JFileChooserpromptToSaveFile(String filename) Prompts the user to choose a file from their filesystems for our own devious uses.static JFileChooserpromptToSaveFile(String filename, String[] extensions) Get a JFileChooser with a new FileFilter.static voidsetLastJFCDirectory(String lastJFCDirectory) 
- 
Method Details- 
promptToOpenFilePrompts the user to choose a file or a directory 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
 
- 
promptToOpenFilePrompts the user to choose a file or a directory 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.- Parameters:
- existingFileName- The name of a file with path. If the filename points to an existing file, the directory in which it lies, will be used as the starting point for the returned JFileChooser.
- Returns:
- the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
 
- 
promptToOpenFilePrompts the user to choose a file or a directory 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.- Parameters:
- existingFileName- The name of a file with path. If the filename points to an existing file, the directory in which it lies, will be used as the starting point for the returned JFileChooser.
- onlyDirectories- If true, only directories are displayed in the FileChooser
- Returns:
- the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
 
- 
promptToOpenFilePrompts the user to choose a file or a directory 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.- Parameters:
- exts- The list of allowed file extensions. If empty, any file extension is allowed
- Returns:
- the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
 
- 
promptToOpenFilePrompts the user to choose a file or a directory 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.- Parameters:
- exts- The list of allowed file extensions. If empty, any file extension is allowed
- existingFileName- The name of a file with path. If the filename points to an existing file, the directory in which it lies, will be used as the starting point for the returned JFileChooser.
- Returns:
- the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
 
- 
promptToOpenFilepublic static JFileChooser promptToOpenFile(String[] exts, String existingFileName, boolean onlyDirectories) Prompts the user to choose a file or a directory 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.- Parameters:
- exts- The list of allowed file extensions. If empty, any file extension is allowed
- existingFileName- The name of a file with path. If the filename points to an existing file, the directory in which it lies, will be used as the starting point for the returned JFileChooser.
- onlyDirectories- If true, only directories are displayed in the FileChooser
- Returns:
- the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
 
- 
promptToOpenFilepublic static JFileChooser promptToOpenFile(Component parentComponent, String[] exts, String existingFileName, boolean onlyDirectories) Prompts the user to choose a file or a directory 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.- Parameters:
- parentComponent- Component parent of current element
- exts- The list of allowed file extensions. If empty, any file extension is allowed
- existingFileName- The name of a file with path. If the filename points to an existing file, the directory in which it lies, will be used as the starting point for the returned JFileChooser.
- onlyDirectories- If true, only directories are displayed in the FileChooser
- Returns:
- the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
 
- 
promptToSaveFilePrompts 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.- Parameters:
- filename- The name of a file with path. If the filename points to an existing file, the directory in which it lies, will be used as the starting point for the returned JFileChooser.
- Returns:
- the JFileChooser that interacted with the user, after they are finished using it - null if no file was chosen
- See Also:
 
- 
promptToSaveFileGet a JFileChooser with a new FileFilter.- Parameters:
- filename- file name
- extensions- list of extensions
- Returns:
- the FileChooser - null if no file was chosen
 
- 
getLastJFCDirectory- Returns:
- The last directory visited by the user while choosing Files
 
- 
setLastJFCDirectory- Parameters:
- lastJFCDirectory- The last directory visited by the user while choosing Files
 
 
-