public abstract class AbstractFileSelector
extends java.lang.Object
| Constructor and Description |
|---|
AbstractFileSelector() |
| Modifier and Type | Method and Description |
|---|---|
protected java.io.File |
choose(java.lang.String msg,
java.lang.Class<?> key,
int dialogType,
int selMode)
Choose a file, opening a file chooser at the location already associated
with the class (if any), and saving the selected location with the class.
|
protected java.io.File |
chooseDirectory(java.lang.String msg,
java.lang.Class<?> key)
Chooses a directory, showing the specified message, associated
with the specified key.
|
protected java.io.File |
chooseFile(java.lang.String msg,
java.lang.Class<?> key)
Chooses a file for opening, showing the specified message, associated
with the specified key.
|
protected java.io.File |
chooseFileForWriting(java.lang.String msg,
java.lang.Class<?> key)
Chooses a file for writing, showing the specified message, associated
with the specified key.
|
protected javax.swing.JFileChooser |
getFileChooser()
Returns the file chooser for this instance.
|
protected java.io.File |
getLocation(java.lang.Class<?> key)
Gets a location indexed by the specified class as a key.
|
protected void |
setLocation(java.lang.Class<?> key,
java.io.File loc)
Sets a location indexed by the specified class as a key.
|
protected java.io.File getLocation(java.lang.Class<?> key)
key - the class used as a key for the locationnull if
nonejava.lang.NullPointerException - if the specified key is nullprotected void setLocation(java.lang.Class<?> key,
java.io.File loc)
key - the class used as a key for the locationloc - the locationjava.lang.NullPointerException - if the specified key or location is nullprotected java.io.File chooseFile(java.lang.String msg,
java.lang.Class<?> key)
msg - the message to show to the userkey - the class with which to associate the locationprotected java.io.File chooseFileForWriting(java.lang.String msg,
java.lang.Class<?> key)
msg - the message to show to the userkey - the class with which to associate the locationprotected java.io.File chooseDirectory(java.lang.String msg,
java.lang.Class<?> key)
msg - the message to show to the userkey - the class with which to associate the locationprotected java.io.File choose(java.lang.String msg,
java.lang.Class<?> key,
int dialogType,
int selMode)
msg - the message to displaykey - the class with which the location selected should be
associateddialogType - the type of dialog, see
JFileChooser.setDialogType(int)selMode - file selection mode, see
JFileChooser.setFileSelectionMode(int)protected javax.swing.JFileChooser getFileChooser()
Copyright © 2011 Massachusetts Institute of Technology. All Rights Reserved.