Revision 24648 branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/FThemeManagerWindow.java

View differences:

FThemeManagerWindow.java
490 490
				if (jfc.showSaveDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION)
491 491
				{
492 492
					File file=jfc.getSelectedFile();
493

  
494
					Object[] options = {PluginServices.getText(this, "yes"),
495
							PluginServices.getText(this, "no"),
496
							PluginServices.getText(this, "Cancel")};
497

  
498
					if (file.exists()) {
499
						int answer = JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
500
								PluginServices.getText(this, "error_file_exists")+".\n"+
501
								PluginServices.getText(this, "do_you_want_to_overwrite_it"),
502
								PluginServices.getText(this, "confirmation_dialog"),
503
								JOptionPane.YES_NO_CANCEL_OPTION,
504
								JOptionPane.QUESTION_MESSAGE,
505
								null,
506
								options, options[1]);
507
						if (answer!=JOptionPane.OK_OPTION) {
508
							// 'Cancel' pressed or window closed: don't save anythig, exit save dialog
509
							return;
510
						}
511
					}
512

  
513

  
493 514
					if (jfc.getFileFilter().accept(new File("dummy.sld")))
494 515
					{
495 516
						if (!(file.getPath().toLowerCase().endsWith(".sld"))){

Also available in: Unified diff