Changeset 7414 in josm for trunk/src/org/openstreetmap/josm/io
- Timestamp:
- 2014-08-16T04:29:00+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r7037 r7414 37 37 import org.openstreetmap.josm.tools.GBC; 38 38 39 /** 40 * Exports data to a .gpx file. Data may be native GPX or OSM data which will be converted. 41 * @since 1949 42 */ 39 43 public class GpxExporter extends FileExporter implements GpxConstants { 40 private static final String warningGpl = "<html><font color='red' size='-2'>" 44 45 private static final String GPL_WARNING = "<html><font color='red' size='-2'>" 41 46 + tr("Note: GPL is not compatible with the OSM license. Do not upload GPL licensed tracks.") + "</html>"; 42 47 … … 74 79 GpxData gpxData; 75 80 // At this moment, we only need to know the attributes of the GpxData, 76 // conversion of OsmDataLayer (if needed) will be done after the dialog 77 // is closed. 81 // conversion of OsmDataLayer (if needed) will be done after the dialog is closed. 78 82 if (layer instanceof GpxLayer) { 79 83 gpxData = ((GpxLayer) layer).data; … … 175 179 } 176 180 177 178 181 try (OutputStream fo = Compression.getCompressedFileOutputStream(file)) { 179 182 new GpxWriter(fo).write(gpxData); … … 194 197 copyrightLabel.setEnabled(enable); 195 198 copyrightYearLabel.setEnabled(enable); 196 warning.setText(enable ? warningGpl: "<html><font size='-2'> </html");199 warning.setText(enable ? GPL_WARNING : "<html><font size='-2'> </html"); 197 200 198 201 if (enable) { … … 220 223 /** 221 224 * Add all those listeners to handle the enable state of the fields. 222 * @param copyrightYearLabel223 * @param copyrightLabel224 * @param emailLabel225 * @param nameLabel226 * @param warning227 225 */ 228 226 private static void addDependencies( … … 299 297 return; 300 298 final String[] urls = { 301 "https://creativecommons.org/licenses/by-sa/ 2.5",299 "https://creativecommons.org/licenses/by-sa/3.0", 302 300 "http://opendatacommons.org/licenses/odbl/1.0", 303 301 "public domain", … … 329 327 return Main.main.getCurrentDataSet(); 330 328 } 331 332 329 }
Note:
See TracChangeset
for help on using the changeset viewer.