initColumns();\r
}\r
\r
+ public int showSaveDialog(Component parent) throws HeadlessException {\r
+ setDialogType(SAVE_DIALOG);\r
+ int ret = showDialog(parent, null);\r
+\r
+ if(ret == JalviewFileChooser.APPROVE_OPTION && getSelectedFile().exists() )\r
+ {\r
+ int confirm = JOptionPane.showConfirmDialog(parent,\r
+ "Overwrite existing file?",\r
+ "File exists",\r
+ JOptionPane.YES_NO_OPTION);\r
+ if(confirm!=JOptionPane.YES_OPTION)\r
+ ret = this.CANCEL_OPTION;\r
+ }\r
+ return ret;\r
+ }\r
+\r
+\r
void initColumns()\r
{\r
if (COLUMNS == null)\r
UIManager.getString("FileChooser.fileAttrHeaderText",l)\r
};\r
}\r
-\r
}\r
\r
/**************************************************************************\r