|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.mit.jmwe.util.AbstractFileSelector
public abstract class AbstractFileSelector
Abstract base class that allows interaction with the user, saving and selecting files and directories.
Constructor Summary | |
---|---|
AbstractFileSelector()
|
Method Summary | |
---|---|
protected File |
choose(String msg,
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 File |
chooseDirectory(String msg,
Class<?> key)
Chooses a directory, showing the specified message, associated with the specified key. |
protected File |
chooseFile(String msg,
Class<?> key)
Chooses a file for opening, showing the specified message, associated with the specified key. |
protected File |
chooseFileForWriting(String msg,
Class<?> key)
Chooses a file for writing, showing the specified message, associated with the specified key. |
protected JFileChooser |
getFileChooser()
Returns the file chooser for this instance. |
protected File |
getLocation(Class<?> key)
Gets a location indexed by the specified class as a key. |
protected void |
setLocation(Class<?> key,
File loc)
Sets a location indexed by the specified class as a key. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public AbstractFileSelector()
Method Detail |
---|
protected File getLocation(Class<?> key)
key
- the class used as a key for the location
null
if
none
NullPointerException
- if the specified key is null
protected void setLocation(Class<?> key, File loc)
key
- the class used as a key for the locationloc
- the location
NullPointerException
- if the specified key or location is null
protected File chooseFile(String msg, Class<?> key)
msg
- the message to show to the userkey
- the class with which to associate the location
protected File chooseFileForWriting(String msg, Class<?> key)
msg
- the message to show to the userkey
- the class with which to associate the location
protected File chooseDirectory(String msg, Class<?> key)
msg
- the message to show to the userkey
- the class with which to associate the location
protected File choose(String msg, 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 JFileChooser getFileChooser()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |