- Timestamp:
- 2010-01-16T19:51:23+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/gpx/WayPoint.java
r2247 r2867 5 5 6 6 import java.awt.Color; 7 import java.util.Date; 7 8 8 9 import org.openstreetmap.josm.data.coor.CachedLatLon; … … 54 55 return Double.compare(time, w.time); 55 56 } 57 58 public Date getTime() { 59 return new Date((long) (time * 1000)); 60 } 56 61 } -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r2851 r2867 26 26 import java.util.Collections; 27 27 import java.util.Comparator; 28 import java.util.Date;29 28 import java.util.LinkedList; 30 29 import java.util.List; … … 375 374 376 375 if (data.tracks.size() > 0) { 377 info.append("<table><thead align= \"center\"><tr><td colspan=\"5\">"376 info.append("<table><thead align='center'><tr><td colspan='5'>" 378 377 + trn("{0} track", "{0} tracks", data.tracks.size(), data.tracks.size()) 379 + "</td></tr><tr ><td>" + tr("Name") + "</td><td>"378 + "</td></tr><tr align='center'><td>" + tr("Name") + "</td><td>" 380 379 + tr("Description") + "</td><td>" + tr("Timespan") 381 380 + "</td><td>" + tr("Length") + "</td><td>" + tr("URL") … … 410 409 411 410 if (earliest != null && latest != null) { 412 DateFormat df = DateFormat.getDateTimeInstance(DateFormat.MEDIUM, DateFormat.SHORT); 413 info.append(df.format(new Date((long) (earliest.time * 1000))) + " - " 414 + df.format(new Date((long) (latest.time * 1000)))); 411 DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT); 412 String earliestDate = df.format(earliest.getTime()); 413 String latestDate = df.format(latest.getTime()); 414 415 if (earliestDate.equals(latestDate)) { 416 DateFormat tf = DateFormat.getTimeInstance(DateFormat.SHORT); 417 info.append(earliestDate).append(" "); 418 info.append(tf.format(earliest.getTime())).append(" - ").append(tf.format(latest.getTime())); 419 } else { 420 DateFormat dtf = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); 421 info.append(dtf.format(earliest.getTime())).append(" - ").append(dtf.format(latest.getTime())); 422 } 423 415 424 int diff = (int) (latest.time - earliest.time); 416 425 info.append(" (" + (diff / 3600) + ":" + ((diff % 3600) / 60) + ")"); -
trunk/src/org/openstreetmap/josm/io/GpxImporter.java
r2851 r2867 56 56 Runnable task = new Runnable() { 57 57 public void run() { 58 if ( !r.data.tracks.isEmpty() || ! r.data.routes.isEmpty()) {58 if (r.data.hasRoutePoints() || r.data.hasTrackPoints()) { 59 59 Main.main.addLayer(gpxLayer); 60 60 }
Note:
See TracChangeset
for help on using the changeset viewer.