public class KeYFileChooser extends Object
Modifier and Type | Field and Description |
---|---|
private JFileChooser |
fileChooser |
private static FileFilter |
FILTER |
private static File |
HOME_DIR |
private static KeYFileChooser |
INSTANCE |
private File |
resetFile |
private boolean |
saveDialog |
Modifier | Constructor and Description |
---|---|
private |
KeYFileChooser(File initDir) |
Modifier and Type | Method and Description |
---|---|
File |
getCurrentDirectory() |
static KeYFileChooser |
getFileChooser(String title)
Gets the file chooser for the prover.
|
File |
getSelectedFile() |
void |
prepare() |
void |
resetPath() |
void |
selectFile(File f) |
void |
setDialogTitle(String title) |
private void |
setSaveDialog(boolean b) |
boolean |
showOpenDialog(Component component) |
private int |
showOverwriteDialog(File file) |
boolean |
showSaveDialog(Component parent) |
boolean |
showSaveDialog(Component parent,
File selectedFile) |
boolean |
showSaveDialog(Component parent,
File originalFile,
String extension)
Show a file dialog for saving a file.
|
private static final File HOME_DIR
private static final FileFilter FILTER
private static KeYFileChooser INSTANCE
private final JFileChooser fileChooser
private boolean saveDialog
private File resetFile
private KeYFileChooser(File initDir)
public void prepare()
public void setDialogTitle(String title)
private void setSaveDialog(boolean b)
public boolean showSaveDialog(Component parent)
public boolean showSaveDialog(Component parent, File originalFile, String extension)
parent
- the main windoworiginalFile
- the original file to be saved, if it exists and is a proof, this will be the suggestionextension
- the desired file name extension (usually ".proof")public void resetPath()
public File getCurrentDirectory()
public boolean showOpenDialog(Component component)
public File getSelectedFile()
public void selectFile(File f)
private int showOverwriteDialog(File file)
public static KeYFileChooser getFileChooser(String title)
title
- the title of the key file chooser