All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class java.awt.FileDialog

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Container
                   |
                   +----java.awt.Window
                           |
                           +----java.awt.Dialog
                                   |
                                   +----java.awt.FileDialog

public class FileDialog
extends Dialog
The File Dialog class displays a file selection dialog. It is a modal dialog and will block the calling thread when the show method is called to display it, until the user has chosen a file.

See Also:
show

Variable Index

 o LOAD
The file load variable.
 o SAVE
The file save variable.

Constructor Index

 o FileDialog(Frame)
Creates a file dialog for loading a file.
 o FileDialog(Frame, String)
Creates a file dialog for loading a file.
 o FileDialog(Frame, String, int)
Creates a file dialog with the specified title and mode.

Method Index

 o addNotify()
Creates the file dialog's peer.
 o getDirectory()
Gets the directory of the Dialog.
 o getFile()
Gets the file of the Dialog.
 o getFilenameFilter()
Gets the filter.
 o getMode()
Gets the mode of the file dialog.
 o paramString()
Returns the parameter String of this file dialog.
 o setDirectory(String)
Set the directory of the Dialog to the specified directory.
 o setFile(String)
Sets the file for this dialog to the specified file.
 o setFilenameFilter(FilenameFilter)
Sets the filter for this dialog to the specified filter.
 o setMode(int)
Sets the mode of the file dialog.

Variables

 o LOAD
 public static final int LOAD
The file load variable.

 o SAVE
 public static final int SAVE
The file save variable.

Constructors

 o FileDialog
 public FileDialog(Frame parent)
Creates a file dialog for loading a file. The title of the file dialog is initialy empty.

Parameters:
parent - the owner of the dialog
 o FileDialog
 public FileDialog(Frame parent,
                   String title)
Creates a file dialog for loading a file.

Parameters:
parent - the owner of the dialog
title - the title of the Dialog
 o FileDialog
 public FileDialog(Frame parent,
                   String title,
                   int mode)
Creates a file dialog with the specified title and mode.

Parameters:
parent - the owner of the dialog
title - the title of the Dialog
mode - the mode of the Dialog

Methods

 o addNotify
 public void addNotify()
Creates the file dialog's peer. The peer allows us to change the look of the file dialog without changing its functionality.

Overrides:
addNotify in class Dialog
 o getMode
 public int getMode()
Gets the mode of the file dialog. The mode determines whether this file dialog will be used for loading a file (LOAD) or saving a file (SAVE).

 o setMode
 public void setMode(int mode)
Sets the mode of the file dialog.

Parameters:
mode - the mode (LOAD or SAVE) for this file dialog.
 o getDirectory
 public String getDirectory()
Gets the directory of the Dialog.

 o setDirectory
 public synchronized void setDirectory(String dir)
Set the directory of the Dialog to the specified directory.

Parameters:
dir - the specific directory
 o getFile
 public String getFile()
Gets the file of the Dialog.

 o setFile
 public synchronized void setFile(String file)
Sets the file for this dialog to the specified file. This will become the default file if set before the dialog is shown.

Parameters:
file - the file being set
 o getFilenameFilter
 public FilenameFilter getFilenameFilter()
Gets the filter.

 o setFilenameFilter
 public synchronized void setFilenameFilter(FilenameFilter filter)
Sets the filter for this dialog to the specified filter.

Parameters:
filter - the specified filter
 o paramString
 protected String paramString()
Returns the parameter String of this file dialog. Parameter String.

Overrides:
paramString in class Dialog

All Packages  Class Hierarchy  This Package  Previous  Next  Index

Submit a bug or feature