|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
java.awt.Window
java.awt.Dialog
java.awt.FileDialog
public class FileDialog
This class implements a file selection dialog box widget.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.awt.Dialog |
|---|
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType |
| Nested classes/interfaces inherited from class java.awt.Window |
|---|
Window.AccessibleAWTWindow |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| 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. |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| 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. |
| Methods inherited from class java.awt.Dialog |
|---|
dispose, getAccessibleContext, getTitle, hide, isModal, isResizable, isUndecorated, setModal, setResizable, setTitle, setUndecorated, show |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int LOAD
public static final int SAVE
| Constructor Detail |
|---|
public FileDialog(Dialog parent)
FileDialog with the specified
parent. This dialog will have no title and will be for loading a file.
parent - The parent dialog for this.
public FileDialog(Dialog parent,
String title)
FileDialog with the
specified parent and title. This dialog will be for opening a file.
parent - The parent dialog for this.title - The title for this dialog.
public FileDialog(Dialog parent,
String title,
int mode)
FileDialog with the specified
parent, title, and mode.
parent - The parent dialog for this.title - The title for this dialog.mode - The mode of the dialog, either LOAD or
SAVE.
IllegalArgumentException - - if illegal mode, if
GraphicsEnvironment.isHeadless or if parent is null.public FileDialog(Frame parent)
FileDialog with the
specified parent. This dialog will have no title and will be for
loading a file.
parent - The parent frame for this dialog.
public FileDialog(Frame parent,
String title)
FileDialog with the
specified parent and title. This dialog will be for opening a file.
parent - The parent frame for this dialog.title - The title for this dialog.
public FileDialog(Frame parent,
String title,
int mode)
FileDialog with the
specified parent, title, and mode.
parent - The parent frame for this dialog.title - The title for this dialog.mode - The mode of the dialog, either LOAD or
SAVE.
IllegalArgumentException - If an illegal file dialog mode
is supplied.| Method Detail |
|---|
public int getMode()
LOAD or
SAVE.
public void setMode(int mode)
LOAD or
SAVE. This method is only effective before the native
peer is created.
mode - The new mode of this file dialog.
IllegalArgumentException - If an illegal file dialog mode
is supplied.public String getDirectory()
public void setDirectory(String dir)
dir - The new directory for this file dialog.public String getFile()
public void setFile(String file)
file - The selected file for this dialog.public FilenameFilter getFilenameFilter()
public void setFilenameFilter(FilenameFilter filter)
filter - The new filename filter for this file dialog box.public void addNotify()
addNotify in class DialogComponent.isDisplayable(),
Component.removeNotify()protected String paramString()
paramString in class Dialog
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||