public class FileChooserDirModel extends java.lang.Object
JFileChooser
to use the same directory.
If one registered component changes its current directory, all the others are updated.Constructor and Description |
---|
FileChooserDirModel() |
FileChooserDirModel(java.io.File currentDirectory) |
Modifier and Type | Method and Description |
---|---|
void |
addFileChooser(javax.swing.JFileChooser fileChooser) |
boolean |
contains(javax.swing.JFileChooser fileChooser) |
java.io.File |
getCurrentDirectory() |
boolean |
isSaveCanceled() |
void |
removeFileChooser(javax.swing.JFileChooser fileChooser) |
void |
setCurrentDirectory(java.io.File currentDirectory) |
void |
setSaveCanceled(boolean saveCanceled)
If
setSaveCanceled(true) is called the current directory is also updated if the
user cancels the file chooser dialog.Default value is true . |
public FileChooserDirModel()
public FileChooserDirModel(java.io.File currentDirectory)
public java.io.File getCurrentDirectory()
public void setCurrentDirectory(java.io.File currentDirectory)
public boolean isSaveCanceled()
public void setSaveCanceled(boolean saveCanceled)
setSaveCanceled(true)
is called the current directory is also updated if the
user cancels the file chooser dialog.true
.saveCanceled
- public boolean contains(javax.swing.JFileChooser fileChooser)
public void addFileChooser(javax.swing.JFileChooser fileChooser)
public void removeFileChooser(javax.swing.JFileChooser fileChooser)