Revision 12028
branches/v10/applications/appgvSIG/src/com/iver/cit/gvsig/LayoutControls.java | ||
---|---|---|
51 | 51 |
import java.io.FileWriter; |
52 | 52 |
|
53 | 53 |
import javax.swing.JFileChooser; |
54 |
import javax.swing.JOptionPane; |
|
54 | 55 |
|
55 | 56 |
import org.apache.log4j.Logger; |
56 | 57 |
import org.exolab.castor.xml.Marshaller; |
... | ... | |
117 | 118 |
if (!(file.getPath().endsWith(".gvt") || file.getPath().endsWith(".GVT"))){ |
118 | 119 |
file=new File(file.getPath()+".gvt"); |
119 | 120 |
} |
121 |
if (file.exists()){ |
|
122 |
int resp = JOptionPane.showConfirmDialog( |
|
123 |
(Component) PluginServices.getMainFrame(),PluginServices.getText(this,"fichero_ya_existe_seguro_desea_guardarlo"), |
|
124 |
PluginServices.getText(this,"guardar"), JOptionPane.YES_NO_OPTION); |
|
125 |
if (resp != JOptionPane.YES_OPTION) { |
|
126 |
return; |
|
127 |
} |
|
128 |
|
|
129 |
} |
|
120 | 130 |
try { |
121 | 131 |
FileWriter writer = new FileWriter(file.getAbsolutePath()); |
122 | 132 |
Marshaller m = new Marshaller(writer); |
Also available in: Unified diff