Changeset 12746 in osm for applications/editors/josm/plugins
- Timestamp:
- 2009-01-01T06:56:26+01:00 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/agpifoj/src/org/openstreetmap/josm/plugins/agpifoj/AgpifojDialog.java
r12588 r12746 35 35 private boolean centerView = false; 36 36 37 // Only one instance of tha rclass37 // Only one instance of that class 38 38 static private AgpifojDialog INSTANCE = null; 39 39 … … 160 160 } 161 161 162 imgDisplay.setImage(entry != null ? entry.file : null); 163 StringBuffer osd = new StringBuffer(entry.file.getName()); 164 if (entry.elevation != null) { 165 osd.append(tr("\nAltitude: ")).append(entry.elevation.longValue()).append(" m"); 162 if (entry != null) { 163 imgDisplay.setImage(entry.file); 164 StringBuffer osd = new StringBuffer(entry.file != null ? entry.file.getName() : ""); 165 if (entry.elevation != null) { 166 osd.append(tr("\nAltitude: {0} m", entry.elevation.longValue())); 167 } 168 if (entry.speed != null) { 169 osd.append(tr("\n{0} km/h", (long) (3.6 * entry.speed))); 170 } 171 imgDisplay.setOsdText(osd.toString()); 172 } else { 173 imgDisplay.setImage(null); 174 imgDisplay.setOsdText(""); 166 175 } 167 if (entry.speed != null) {168 osd.append("\n").append((long) (3.6 * entry.speed)).append(tr(" km/h"));169 }170 imgDisplay.setOsdText(osd.toString());171 176 } 172 173 177 }
Note:
See TracChangeset
for help on using the changeset viewer.