Revision 5425 trunk/extensions/extGeoProcessing/src/com/iver/cit/gvsig/geoprocess/core/gui/AbstractGeoprocessPanel.java
AbstractGeoprocessPanel.java | ||
---|---|---|
45 | 45 |
* |
46 | 46 |
* $Id$ |
47 | 47 |
* $Log$ |
48 |
* Revision 1.1 2006-05-24 21:13:09 azabala |
|
48 |
* Revision 1.2 2006-05-25 08:21:14 jmvivo |
|
49 |
* A?adido metodo de peticion de confirmacion para sobreescribir el fichero de salida |
|
50 |
* |
|
51 |
* Revision 1.1 2006/05/24 21:13:09 azabala |
|
49 | 52 |
* primera version en cvs despues de refactoring orientado a crear un framework extensible de geoprocessing |
50 | 53 |
* |
51 | 54 |
* Revision 1.2 2006/05/08 15:36:33 azabala |
... | ... | |
73 | 76 |
*/ |
74 | 77 |
package com.iver.cit.gvsig.geoprocess.core.gui; |
75 | 78 |
|
79 |
import java.io.File; |
|
76 | 80 |
import java.util.ArrayList; |
77 | 81 |
|
78 | 82 |
import javax.swing.JComboBox; |
... | ... | |
192 | 196 |
return null; |
193 | 197 |
|
194 | 198 |
} |
199 |
/** |
|
200 |
* Confirm overwrite the output file |
|
201 |
* if it allready exist. |
|
202 |
* |
|
203 |
* |
|
204 |
* @param outputFile |
|
205 |
* @return answer |
|
206 |
*/ |
|
207 |
public boolean askForOverwriteOutputFile(File outputFile){ |
|
208 |
String title = PluginServices.getText(this, "Sobreescribir_fichero"); |
|
209 |
String confirmDialogText = |
|
210 |
PluginServices.getText(this, "Sobreescribir_fichero_Pregunta_1")+ |
|
211 |
"\n'" + |
|
212 |
outputFile.getAbsolutePath()+ |
|
213 |
"'\n" + |
|
214 |
PluginServices.getText(this, "Sobreescribir_fichero_Pregunta_2"); |
|
215 |
int option = JOptionPane.showConfirmDialog(this, |
|
216 |
confirmDialogText, |
|
217 |
title, |
|
218 |
JOptionPane.YES_NO_OPTION, |
|
219 |
JOptionPane.QUESTION_MESSAGE, null); |
|
220 |
if(option == JOptionPane.YES_OPTION){ |
|
221 |
return true; |
|
222 |
} |
|
223 |
return false; |
|
224 |
} |
|
225 |
|
|
195 | 226 |
} |
196 | 227 |
|
228 |
|
|
229 |
|
Also available in: Unified diff