java.awt
public class FileDialog extends Dialog implements Serializable
Field Summary | |
---|---|
static int | LOAD
Indicates that the purpose of the dialog is for opening a file. |
static int | SAVE
Indicates that the purpose of the dialog is for saving a file. |
Constructor Summary | |
---|---|
FileDialog(Dialog parent)
Initializes a new instance of FileDialog with the specified
parent. | |
FileDialog(Dialog parent, String title)
Initialized a new instance of FileDialog with the
specified parent and title. | |
FileDialog(Dialog parent, String title, int mode)
Initialized a new instance of FileDialog with the specified
parent, title, and mode.
| |
FileDialog(Frame parent)
Initializes a new instance of FileDialog with the
specified parent. | |
FileDialog(Frame parent, String title)
Initialized a new instance of FileDialog with the
specified parent and title. | |
FileDialog(Frame parent, String title, int mode)
Initialized a new instance of FileDialog with the
specified parent, title, and mode.
|
Method Summary | |
---|---|
void | addNotify()
Creates the native peer for this file dialog box. |
String | getDirectory()
Returns the directory for this file dialog.
|
String | getFile()
Returns the file that is selected in this dialog.
|
FilenameFilter | getFilenameFilter()
Returns the filename filter being used by this dialog.
|
int | getMode()
Returns the mode of this dialog, either LOAD or
SAVE .
|
protected String | paramString()
Returns a debugging string for this object.
|
void | setDirectory(String dir)
Sets the directory for this file dialog.
|
void | setFile(String file)
Sets the selected file for this dialog.
|
void | setFilenameFilter(FilenameFilter filter)
Sets the filename filter used by this dialog.
|
void | setMode(int mode)
Sets the mode of this dialog to either LOAD or
SAVE . |
FileDialog
with the specified
parent. This dialog will have no title and will be for loading a file.
Parameters: parent The parent dialog for this.
Since: 1.5
FileDialog
with the
specified parent and title. This dialog will be for opening a file.
Parameters: parent The parent dialog for this. title The title for this dialog.
Since: 1.5
FileDialog
with the specified
parent, title, and mode.
Parameters: parent The parent dialog for this. title The title for this dialog. mode The mode of the dialog, either LOAD
or
SAVE
.
Throws: IllegalArgumentException - if illegal mode, if GraphicsEnvironment.isHeadless or if parent is null.
Since: 1.5
FileDialog
with the
specified parent. This dialog will have no title and will be for
loading a file.
Parameters: parent The parent frame for this dialog.
FileDialog
with the
specified parent and title. This dialog will be for opening a file.
Parameters: parent The parent frame for this dialog. title The title for this dialog.
FileDialog
with the
specified parent, title, and mode.
Parameters: parent The parent frame for this dialog. title The title for this dialog. mode The mode of the dialog, either LOAD
or
SAVE
.
Throws: IllegalArgumentException If an illegal file dialog mode is supplied.
Returns: The directory for this file dialog.
Returns: The file that is selected in this dialog.
Returns: The filename filter being used by this dialog.
LOAD
or
SAVE
.
Returns: The mode of this dialog.
Returns: A debugging string for this object.
Parameters: dir The new directory for this file dialog.
Parameters: file The selected file for this dialog.
Parameters: filter The new filename filter for this file dialog box.
LOAD
or
SAVE
. This method is only effective before the native
peer is created.
Parameters: mode The new mode of this file dialog.
Throws: IllegalArgumentException If an illegal file dialog mode is supplied.