|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.cornell.cs.sam.ui.components.FileDialogManager
public class FileDialogManager
Nested Class Summary | |
---|---|
class |
FileDialogManager.SimpleFilter
A File filter that checks for a simple extension |
Constructor Summary | |
---|---|
FileDialogManager(int n)
Initialize with n file dialogs - all of which save the last location/type of file opened |
Method Summary | |
---|---|
java.io.File |
getOpenDirectory(java.awt.Component parent,
java.io.File cdir,
int n)
Runs open dialog and returns the directory selected, or null if canceled |
java.io.File |
getOpenFile(java.awt.Component parent,
java.lang.String extension,
java.lang.String filetype,
java.io.File cdir,
int n)
Runs open dialog and returns the file selected, or null if canceled |
java.io.File |
getSaveFile(java.awt.Component parent,
java.lang.String extension,
java.lang.String filetype,
java.io.File cdir,
int n)
Runs file selection dialog and returns the File selected or null if canceled |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public FileDialogManager(int n)
n
- the number of file dialogs to haveMethod Detail |
---|
public java.io.File getOpenFile(java.awt.Component parent, java.lang.String extension, java.lang.String filetype, java.io.File cdir, int n)
parent
- the parent Componentfiletype
- the file type to be savedextension
- the extension for this filetypecdir
- File to set current directory or null otherwisen
- Code of the open dialogpublic java.io.File getSaveFile(java.awt.Component parent, java.lang.String extension, java.lang.String filetype, java.io.File cdir, int n)
parent
- the parent Componentfiletype
- the file type to be savedextension
- the extension for this filetypecdir
- file to set current directory or nulln
- Code of the save dialogpublic java.io.File getOpenDirectory(java.awt.Component parent, java.io.File cdir, int n)
parent
- the parent Componentcdir
- File to set current directory or null otherwisen
- which chooser to display
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |