Changeset 7518 in josm for trunk/src/org/openstreetmap/josm/io/GpxExporter.java
- Timestamp:
- 2014-09-10T02:29:55+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/io/GpxExporter.java
r7414 r7518 90 90 desc.setWrapStyleWord(true); 91 91 desc.setLineWrap(true); 92 desc.setText( (String) gpxData.attr.get(META_DESC));92 desc.setText(gpxData.getString(META_DESC)); 93 93 p.add(new JScrollPane(desc), GBC.eop().fill(GBC.BOTH)); 94 94 … … 120 120 p.add(new JLabel(tr("Keywords")), GBC.eol()); 121 121 JosmTextField keywords = new JosmTextField(); 122 keywords.setText( (String) gpxData.attr.get(META_KEYWORDS));122 keywords.setText(gpxData.getString(META_KEYWORDS)); 123 123 p.add(keywords, GBC.eop().fill(GBC.HORIZONTAL)); 124 124 … … 155 155 if (author.isSelected()) { 156 156 if (authorName.getText().length() > 0) { 157 gpxData. attr.put(META_AUTHOR_NAME, authorName.getText());158 gpxData. attr.put(META_COPYRIGHT_AUTHOR, authorName.getText());157 gpxData.put(META_AUTHOR_NAME, authorName.getText()); 158 gpxData.put(META_COPYRIGHT_AUTHOR, authorName.getText()); 159 159 } 160 160 if (email.getText().length() > 0) { 161 gpxData. attr.put(META_AUTHOR_EMAIL, email.getText());161 gpxData.put(META_AUTHOR_EMAIL, email.getText()); 162 162 } 163 163 if (copyright.getText().length() > 0) { 164 gpxData. attr.put(META_COPYRIGHT_LICENSE, copyright.getText());164 gpxData.put(META_COPYRIGHT_LICENSE, copyright.getText()); 165 165 } 166 166 if (copyrightYear.getText().length() > 0) { 167 gpxData. attr.put(META_COPYRIGHT_YEAR, copyrightYear.getText());167 gpxData.put(META_COPYRIGHT_YEAR, copyrightYear.getText()); 168 168 } 169 169 } … … 171 171 // add the description to the gpx data 172 172 if (desc.getText().length() > 0) { 173 gpxData. attr.put(META_DESC, desc.getText());173 gpxData.put(META_DESC, desc.getText()); 174 174 } 175 175 176 176 // add keywords to the gpx data 177 177 if (keywords.getText().length() > 0) { 178 gpxData. attr.put(META_KEYWORDS, keywords.getText());178 gpxData.put(META_KEYWORDS, keywords.getText()); 179 179 } 180 180 … … 201 201 if (enable) { 202 202 if (copyrightYear.getText().length()==0) { 203 String sCopyrightYear = (String) data.attr.get(META_COPYRIGHT_YEAR);203 String sCopyrightYear = data.getString(META_COPYRIGHT_YEAR); 204 204 if (sCopyrightYear == null) { 205 205 sCopyrightYear = Integer.toString(Calendar.getInstance().get(Calendar.YEAR)); … … 208 208 } 209 209 if (copyright.getText().length()==0) { 210 String sCopyright = (String) data.attr.get(META_COPYRIGHT_LICENSE);210 String sCopyright = data.getString(META_COPYRIGHT_LICENSE); 211 211 if (sCopyright == null) { 212 212 sCopyright = Main.pref.get("lastCopyright", "https://creativecommons.org/licenses/by-sa/2.5"); … … 247 247 emailLabel.setEnabled(b); 248 248 if (b) { 249 String sAuthorName = (String) data.attr.get(META_AUTHOR_NAME);249 String sAuthorName = data.getString(META_AUTHOR_NAME); 250 250 if (sAuthorName == null) { 251 251 sAuthorName = Main.pref.get("lastAuthorName"); 252 252 } 253 253 authorName.setText(sAuthorName); 254 String sEmail = (String) data.attr.get(META_AUTHOR_EMAIL);254 String sEmail = data.getString(META_AUTHOR_EMAIL); 255 255 if (sEmail == null) { 256 256 sEmail = Main.pref.get("lastAuthorEmail");
Note:
See TracChangeset
for help on using the changeset viewer.