Changeset 13050 in josm for trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
- Timestamp:
- 2017-10-29T14:57:41+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
r12735 r13050 20 20 import org.openstreetmap.josm.data.coor.conversion.DecimalDegreesCoordinateFormat; 21 21 import org.openstreetmap.josm.tools.GBC; 22 import org.openstreetmap.josm.tools.JosmDecimalFormatSymbolsProvider; 23 import org.openstreetmap.josm.tools.Logging; 22 24 import org.openstreetmap.josm.tools.OsmUrlToBounds; 23 25 … … 99 101 double minlon, minlat, maxlon, maxlat; 100 102 try { 101 minlat = Double.parseDouble(tfLatLon[0].getText().trim());102 minlon = Double.parseDouble(tfLatLon[1].getText().trim());103 maxlat = Double.parseDouble(tfLatLon[2].getText().trim());104 maxlon = Double.parseDouble(tfLatLon[3].getText().trim());103 minlat = JosmDecimalFormatSymbolsProvider.parseDouble(tfLatLon[0].getText().trim()); 104 minlon = JosmDecimalFormatSymbolsProvider.parseDouble(tfLatLon[1].getText().trim()); 105 maxlat = JosmDecimalFormatSymbolsProvider.parseDouble(tfLatLon[2].getText().trim()); 106 maxlon = JosmDecimalFormatSymbolsProvider.parseDouble(tfLatLon[3].getText().trim()); 105 107 } catch (NumberFormatException e) { 108 Logging.trace(e); 106 109 return null; 107 110 } 108 111 if (!LatLon.isValidLon(minlon) || !LatLon.isValidLon(maxlon) 109 112 || !LatLon.isValidLat(minlat) || !LatLon.isValidLat(maxlat)) 110 113 return null; 111 114 if (minlon > maxlon) … … 145 148 double value = 0; 146 149 try { 147 value = Double.parseDouble(getComponent().getText());150 value = JosmDecimalFormatSymbolsProvider.parseDouble(getComponent().getText()); 148 151 } catch (NumberFormatException ex) { 149 152 feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText())); 153 Logging.trace(ex); 150 154 return; 151 155 } … … 160 164 public boolean isValid() { 161 165 try { 162 return LatLon.isValidLat(Double.parseDouble(getComponent().getText())); 163 } catch (NumberFormatException ex) { 166 return LatLon.isValidLat(JosmDecimalFormatSymbolsProvider.parseDouble(getComponent().getText())); 167 } catch (NumberFormatException ex) { 168 Logging.trace(ex); 164 169 return false; 165 170 } … … 181 186 double value = 0; 182 187 try { 183 value = Double.parseDouble(getComponent().getText());188 value = JosmDecimalFormatSymbolsProvider.parseDouble(getComponent().getText()); 184 189 } catch (NumberFormatException ex) { 185 190 feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText())); 191 Logging.trace(ex); 186 192 return; 187 193 } … … 196 202 public boolean isValid() { 197 203 try { 198 return LatLon.isValidLon(Double.parseDouble(getComponent().getText())); 199 } catch (NumberFormatException ex) { 204 return LatLon.isValidLon(JosmDecimalFormatSymbolsProvider.parseDouble(getComponent().getText())); 205 } catch (NumberFormatException ex) { 206 Logging.trace(ex); 200 207 return false; 201 208 }
Note:
See TracChangeset
for help on using the changeset viewer.