- Timestamp:
- 2007-12-17T13:50:12+01:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r444 r494 81 81 82 82 @Override public Object getInfoComponent() { 83 return "<html>" + data.attr.get("name") + ":" + "<br />" + data.attr.get("desc") + "</html>";83 return getToolTipText(); 84 84 } 85 85 … … 200 200 201 201 @Override public String getToolTipText() { 202 return "<html>" + data.attr.get("name") + ":" + "<br />" + data.attr.get("desc") + "</html>"; 202 StringBuilder info = new StringBuilder().append("<html>"); 203 204 info.append(trn("{0} track, ", "{0} tracks, ", 205 data.tracks.size(), data.tracks.size())) 206 .append(trn("{0} route, ", "{0} routes, ", 207 data.routes.size(), data.routes.size())) 208 .append(trn("{0} waypoint", "{0} waypoints", 209 data.waypoints.size(), data.waypoints.size())) 210 .append("<br />"); 211 212 if (data.attr.containsKey("name")) 213 info.append(tr("Name: {0}", data.attr.get("name"))) 214 .append("<br />"); 215 216 if (data.attr.containsKey("desc")) 217 info.append(tr("Description: {0}", data.attr.get("desc"))) 218 .append("<br />"); 219 220 return info.append("</html>").toString(); 203 221 } 204 222
Note:
See TracChangeset
for help on using the changeset viewer.