public class OpenFile
extends java.lang.Object
| Constructor and Description |
|---|
OpenFile() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
chooseDirectory(java.lang.String title)
Factory method to create a new open dialog box to search for a directory.
|
static java.lang.String |
chooseInputFile(FileType type,
java.lang.String title)
Factory method to create a new open dialog box using the default Type.
|
static java.lang.String |
chooseInputFile(FileType type,
java.lang.String title,
boolean wantDirectory)
Factory method to create a new open dialog box using the default Type.
|
static java.lang.String |
chooseInputFile(FileType type,
java.lang.String title,
boolean wantDirectory,
java.lang.String initialDir,
boolean setSelectedDirAsWorkingDir)
Factory method to create a new open dialog box using the default Type.
|
static java.lang.String |
chooseOutputFile(FileType[] types,
java.lang.String title,
java.lang.String defaultFile)
Factory method to create a new save dialog box using the
default EFileFilter.
|
static java.lang.String |
chooseOutputFile(FileType type,
java.lang.String title,
java.lang.String defaultFile)
Factory method to create a new save dialog box using the
default EFileFilter.
|
static FileType |
getOpenFileType(java.lang.String libName,
FileType def)
Method to determine OpenFile type based on extension
|
public static java.lang.String chooseInputFile(FileType type, java.lang.String title)
type - the type of file to read. Defaults to ANY if null.title - dialog title to use; if null uses "Open 'filetype'".public static java.lang.String chooseDirectory(java.lang.String title)
title - dialog title to use; if null uses "Select Directory".public static java.lang.String chooseInputFile(FileType type, java.lang.String title, boolean wantDirectory)
type - the type of file to read. Defaults to ANY if null.title - dialog title to use; if null uses "Open 'filetype'".wantDirectory - true to request a directory be selected, instead of a file.public static java.lang.String chooseInputFile(FileType type, java.lang.String title, boolean wantDirectory, java.lang.String initialDir, boolean setSelectedDirAsWorkingDir)
type - the type of file to read. Defaults to ANY if null.title - dialog title to use; if null uses "Open 'filetype'".wantDirectory - true to request a directory be selected, instead of a file.initialDir - the initial directorysetSelectedDirAsWorkingDir - if the user approves the selection,
set the directory as the current working dir if this is true.public static java.lang.String chooseOutputFile(FileType type, java.lang.String title, java.lang.String defaultFile)
type - the type of file. Defaults to ANY if null.title - dialog title to use; if null uses "Write 'filetype'".defaultFile - default file name to write.public static java.lang.String chooseOutputFile(FileType[] types, java.lang.String title, java.lang.String defaultFile)
types - the types of file. Defaults to ANY if null.title - dialog title to use; if null uses "Write 'filetype'".defaultFile - default file name to write.