|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjewl.Window
jewl.Container
jewl.Dialog
jewl.FileDialog
The abstract base class for the standard file-chooser dialogs.
The dialog has Accept and Cancel buttons, and its execute()
method will return a specified command character if the dialog is
closed by pressing the Accept button, or the null character '\0'
otherwise.
| Constructor Summary | |
FileDialog(java.lang.String title,
char action)
Construct a new file-chooser dialog. |
|
| Method Summary | |
void |
addFilter(java.lang.String[] extensions,
java.lang.String description)
Insert a new file filter into the dialog. |
void |
addFilter(java.lang.String extension,
java.lang.String description)
Add a new file filter into the dialog. |
abstract char |
execute()
Execute the dialog to allow a file to be chosen. |
java.lang.String |
getDirectory()
Get the full pathname of the current directory being used by this dialog. |
java.io.File |
getFile()
Get the file that was selected using this dialog. |
java.lang.String |
getName()
Get the full pathname of the file that was selected using this dialog. |
void |
setDirectory(java.lang.String name)
Set the initial directory that will be displayed when the dialog is executed. |
void |
setLocation(int left,
int top)
Set the location of this dialog. |
void |
setSize(int width,
int height)
Set the size of this dialog. |
| Methods inherited from class jewl.Dialog |
error, error, getString, getString, getTitle, message, message, query, query, setTitle, setValidator, show |
| Methods inherited from class jewl.Container |
getBorderHeight, getBorderWidth, getInteriorHeight, getInteriorWidth |
| Methods inherited from class jewl.Window |
addEventListener, commandAvailable, getCommand, getFont, getHeight, getID, getLeft, getScreenHeight, getScreenWidth, getSource, getTop, getWidth, hide, init, isVisible, nextCommand, parent, root, setFont, setID, show |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public FileDialog(java.lang.String title,
char action)
title - the title displayed in the dialog's title bar.action - the command code generated when the dialog is closed
using the "Accept" button.| Method Detail |
public void setSize(int width,
int height)
setSize in class Windowwidth - ignored.height - ignored.
public void setLocation(int left,
int top)
setLocation in class Windowleft - ignored.top - ignored.public abstract char execute()
execute in class Dialogpublic java.lang.String getName()
public java.io.File getFile()
public void setDirectory(java.lang.String name)
name - the directory name to select.public java.lang.String getDirectory()
public void addFilter(java.lang.String extension,
java.lang.String description)
extension - the desired file extension, with or without a leading dot.description - a description of the type of file selected by this filter.
public void addFilter(java.lang.String[] extensions,
java.lang.String description)
extensions - an array containing the desired file extensions, with or without
leading dots.description - a description of the type of file selected by this filter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||