Revision 28273 branches/v2_0_0_prep/applications/appgvSIG/src/com/iver/cit/gvsig/project/documents/view/legend/gui/LegendManager.java

View differences:

LegendManager.java
83 83
import org.gvsig.fmap.mapcontext.rendering.legend.SingleSymbolLegend;
84 84
import org.gvsig.fmap.mapcontext.rendering.legend.driver.IFMapLegendDriver;
85 85
import org.gvsig.fmap.mapcontext.rendering.legend.driver.LegendDriverException;
86
import org.gvsig.fmap.mapcontext.rendering.legend.driver.gvl.FMapGVLDriver;
86 87
import org.gvsig.gui.beans.swing.JButton;
87 88

  
88 89
import com.iver.andami.PluginServices;
......
138 139

  
139 140

  
140 141
				File basedir = null;
141
				Object[] options = {PluginServices.getText(this, "yes"),
142
						PluginServices.getText(this, "no"),
143
						PluginServices.getText(this, "Cancel")};
144

  
145 142
				jfc.setCurrentDirectory(basedir);
146 143
				if (jfc.showSaveDialog((Component) PluginServices.getMainFrame()) == JFileChooser.APPROVE_OPTION) {
147 144

  
......
149 146
					String version = jfc.getDriverVersion();
150 147
					IFMapLegendDriver driver = jfc.getSuitableDriver();
151 148

  
149
					if(!(driver instanceof FMapGVLDriver)){
150
						Object[] options = {PluginServices.getText(this, "yes"),
151
								PluginServices.getText(this, "no")};
152

  
153
						int answer = JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
154
								PluginServices.getText(this, "not_GVL_save_question")+"\n"+
155
								PluginServices.getText(this, "desea_continuar"),
156
								PluginServices.getText(this, "confirmation_dialog"),
157
								JOptionPane.YES_NO_OPTION,
158
								JOptionPane.QUESTION_MESSAGE,
159
								null,
160
								options, options[1]);
161
						if (answer!=JOptionPane.OK_OPTION) {
162
							// 'Cancel' pressed or window closed: don't save anythig, exit save dialog
163
							return;
164
						}
165
					}
166

  
152 167
					if (file.exists()) {
168
						Object[] options = {PluginServices.getText(this, "yes"),
169
								PluginServices.getText(this, "no"),
170
								PluginServices.getText(this, "Cancel")};
171

  
153 172
						int answer = JOptionPane.showOptionDialog((Component)PluginServices.getMainFrame(),
154
								PluginServices.getText(this, "error_file_exists")+"\n"+
155
								PluginServices.getText(this, "do_you_want_to_overwrite_it")+"?",
173
								PluginServices.getText(this, "fichero_ya_existe_seguro_desea_guardarlo"),
156 174
								PluginServices.getText(this, "confirmation_dialog"),
157 175
								JOptionPane.YES_NO_CANCEL_OPTION,
158 176
								JOptionPane.QUESTION_MESSAGE,

Also available in: Unified diff