Changeset 4420 in josm
- Timestamp:
- 2011-09-14T08:43:54+02:00 (13 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/data/osm/BBox.java
r4319 r4420 3 3 4 4 import java.util.ArrayList; 5 import java.util.Arrays; 5 6 import java.util.List; 6 7 7 8 import org.openstreetmap.josm.data.Bounds; 8 9 import org.openstreetmap.josm.data.coor.LatLon; 10 import org.openstreetmap.josm.tools.Utils; 9 11 10 12 public class BBox { … … 193 195 ", y: " + ymin + " -> " + ymax + " ]"; 194 196 } 197 198 public String toStringCSV(String separator) { 199 return Utils.join(separator, Arrays.asList( 200 LatLon.cDdFormatter.format(xmin), 201 LatLon.cDdFormatter.format(ymin), 202 LatLon.cDdFormatter.format(xmax), 203 LatLon.cDdFormatter.format(ymax))); 204 } 195 205 } -
trunk/src/org/openstreetmap/josm/gui/dialogs/InspectPrimitiveDialog.java
r4410 r4420 237 237 void addSpecial(OsmPrimitive o) { 238 238 if (o instanceof Node) { 239 addCo rrdinates((Node) o);239 addCoordinates((Node) o); 240 240 } else if (o instanceof Way) { 241 addBbox(o); 241 242 addWayNodes((Way) o); 242 243 } else if (o instanceof Relation) { 244 addBbox(o); 243 245 addRelationMembers((Relation) o); 244 246 } … … 264 266 } 265 267 266 void addCorrdinates(Node n) { 268 void addBbox(OsmPrimitive o) { 269 if (o.getBBox() != null) { 270 add(tr("Bounding box: "), o.getBBox().toStringCSV(", ")); 271 } 272 } 273 274 void addCoordinates(Node n) { 267 275 add(tr("Coordinates: "), 268 276 Double.toString(n.getCoor().lat()), ", ", -
trunk/src/org/openstreetmap/josm/gui/download/BookmarkSelection.java
r3530 r4420 24 24 import org.openstreetmap.josm.Main; 25 25 import org.openstreetmap.josm.data.Bounds; 26 import org.openstreetmap.josm.data.Preferences;27 26 import org.openstreetmap.josm.data.coor.CoordinateFormat; 27 import org.openstreetmap.josm.data.osm.BBox; 28 28 import org.openstreetmap.josm.gui.BookmarkList; 29 29 import org.openstreetmap.josm.gui.BookmarkList.Bookmark; … … 153 153 } else { 154 154 lblCurrentDownloadArea.setText(tr("<html><strong>Current download area</strong> (minlon, minlat, maxlon, maxlat): </html>")); 155 bboxDisplay.setText( 156 currentArea.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES)+","+ 157 currentArea.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES)+","+ 158 currentArea.getMax().lonToString(CoordinateFormat.DECIMAL_DEGREES)+","+ 159 currentArea.getMax().latToString(CoordinateFormat.DECIMAL_DEGREES) 160 ); 155 bboxDisplay.setText(new BBox(currentArea).toStringCSV(",")); 161 156 } 162 157 } -
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r4380 r4420 32 32 33 33 import org.openstreetmap.josm.data.Bounds; 34 import org.openstreetmap.josm.data.coor.CoordinateFormat; 34 35 import org.openstreetmap.josm.data.coor.LatLon; 35 36 import org.openstreetmap.josm.tools.GBC; … … 186 187 private void updateBboxFields(Bounds area) { 187 188 if (area == null) return; 188 latlon[0].setText( LatLon.cDdFormatter.format(area.getMin().lat()));189 latlon[1].setText( LatLon.cDdFormatter.format(area.getMin().lon()));190 latlon[2].setText( LatLon.cDdFormatter.format(area.getMax().lat()));191 latlon[3].setText( LatLon.cDdFormatter.format(area.getMax().lon()));189 latlon[0].setText(area.getMin().latToString(CoordinateFormat.DECIMAL_DEGREES)); 190 latlon[1].setText(area.getMin().lonToString(CoordinateFormat.DECIMAL_DEGREES)); 191 latlon[2].setText(area.getMax().latToString(CoordinateFormat.DECIMAL_DEGREES)); 192 latlon[3].setText(area.getMax().lonToString(CoordinateFormat.DECIMAL_DEGREES)); 192 193 for (JTextField tf: latlon) { 193 194 resetErrorMessage(tf);
Note:
See TracChangeset
for help on using the changeset viewer.