this.file = new File(filename);
text.setText(Utilities.getMappedFilename(filename));
}
protected void showFileSaveDialog() {
BrowserDialog dialog = new BrowserDialog(title, filter);
dialog.setFont(ComponentFactory.getStandardFont());
File fileNew = dialog.showCreateFileDialog(this, file);
file = fileNew != null ? fileNew : file;
text.setText(getFilename());
if (fileNew != null) {
try {
RandomAccessFile random = new RandomAccessFile(file, "rw");
random.close();
} catch (Exception exp) {
DcSwingUtilities.displayErrorMessage("msgFileCouldNotbeCreated");
logger.error(DcResources.getText("msgFileCouldNotbeCreated"), exp);
}
}
dialog.dispose();
dialog = null;
}