Changeset 861 in josm for trunk/src/org
- Timestamp:
- 2008-08-24T17:49:47+02:00 (16 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/MapScaler.java
r804 r861 33 33 LatLon ll2 = mv.getLatLon(100,0); 34 34 double dist = ll1.greatCircleDistance(ll2); 35 String text = dist > 1000 ? (Math.round(dist/100)/10.0)+"km" : Math.round(dist*10)/10+"m"; 35 String text = dist > 1000 ? (Math.round(dist/100)/10.0)+" km" : Math.round(dist*10)/10+" m"; 36 36 Rectangle2D bound = g.getFontMetrics().getStringBounds(text, g); 37 37 g.setColor(Main.pref.getColor(marktr("scale"), Color.white)); -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r752 r861 342 342 } 343 343 public void setAngle(double a) { 344 angleText.setText(a < 0 ? "--" : Math.round(a*10)/10.0 + "°"); 344 angleText.setText(a < 0 ? "--" : Math.round(a*10)/10.0 + " °"); 345 345 } 346 346 public void setHeading(double h) { 347 headingText.setText(h < 0 ? "--" : Math.round(h*10)/10.0 + "°"); 347 headingText.setText(h < 0 ? "--" : Math.round(h*10)/10.0 + " °"); 348 348 } 349 349 public void setDist(double dist) { 350 String text = dist > 1000 ? (Math.round(dist/100)/10.0)+"km" : Math.round(dist*10)/10.0 +"m"; 350 String text = dist > 1000 ? (Math.round(dist/100)/10.0)+" km" : Math.round(dist*10)/10.0 +" m"; 351 351 distText.setText(dist < 0 ? "--" : text); 352 352 }
Note:
See TracChangeset
for help on using the changeset viewer.