The FileDialog class provides file selection capabilities for opening or saving files. Because FileDialog is a subclass of Dialog, a FileDialog is always associated with a Frame and is hidden by default. FileDialogs are always modal (i.e., they always attract all user input). In addition, FileDialogs have a load/save mode; the LOAD mode is for selecting files for an application to load, SAVE is for selecting a filename to save.
public class java.awt.FileDialog extends java.awt.Dialog { // Constants public final static int LOAD; public final static int SAVE; // Constructors public FileDialog (Frame parent); public FileDialog (Frame parent, String title); public FileDialog (Frame parent, String title, int mode); // Instance Methods public void addNotify(); public String getDirectory(); public String getFile(); public FilenameFilter getFilenameFilter(); public int getMode(); public synchronized void setDirectory (String directory); public synchronized void setFile (String file); public synchronized void setFilenameFilter (FilenameFilter filter); public void setMode(int mode); // Protected Instance Methods protected String paramString(); }
Constant to specify the FileDialog's load mode.
Constant to specify the FileDialog's save mode.
Frame that is to act as parent of FileDialog.
Constructs a FileDialog object in LOAD mode.
Frame that is to act as parent of FileDialog.
Title to use for FileDialog.
Constructs a FileDialog object in LOAD mode.
Frame that is to act as parent of Dialog.
Title to use for FileDialog.
The constant LOAD or SAVE, specifying the dialog's mode.
Constructs a FileDialog object in the given mode.
Dialog.addNotify()
Creates FileDialog's peer for the native platform.
The current directory for the FileDialog.
The current file selected by the FileDialog.
The current filename filter for the FileDialog.
The current mode of the FileDialog.
Directory to be displayed by the FileDialog.
Changes the directory displayed in the FileDialog.
Initial file string for FileDialog.
Change the default file selected by the FileDialog.
Initial filter for FileDialog.
Changes the current filename filter of the FileDialog.
The constant LOAD or SAVE, specifying the dialog's mode.
Change the mode of the file dialog.
String with current settings of FileDialog.
Dialog.paramString()
Helper method for toString() to generate string of current settings.
Dialog, FilenameFilter, String
This HTML Help has been published using the chm2web software. |