- Timestamp:
- 2010-01-13T20:15:02+01:00 (15 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 20 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/JosmUserIdentityManager.java
r2801 r2850 3 3 4 4 import static org.openstreetmap.josm.tools.I18n.tr; 5 6 import java.text.MessageFormat; 5 7 6 8 import org.openstreetmap.josm.Main; … … 82 84 CheckParameterUtil.ensureParameterNotNull(userName, "userName"); 83 85 if (userName.trim().equals("")) 84 throw new IllegalArgumentException( tr("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName));86 throw new IllegalArgumentException(MessageFormat.format("Expected non-empty value for parameter ''{0}'', got ''{1}''", "userName", userName)); 85 87 this.userName = userName; 86 88 userInfo = null; -
trunk/src/org/openstreetmap/josm/gui/download/BoundingBoxSelection.java
r2626 r2850 217 217 value = Double.parseDouble(tfLatValue.getText()); 218 218 } catch(NumberFormatException ex) { 219 setErrorMessage(tfLatValue,tr("The string ''{0}'' is n''t a valid double value.", tfLatValue.getText()));219 setErrorMessage(tfLatValue,tr("The string ''{0}'' is not a valid double value.", tfLatValue.getText())); 220 220 return; 221 221 } … … 249 249 value = Double.parseDouble(tfLonValue.getText()); 250 250 } catch(NumberFormatException ex) { 251 setErrorMessage(tfLonValue,tr("The string ''{0}'' is n''t a valid double value.", tfLonValue.getText()));251 setErrorMessage(tfLonValue,tr("The string ''{0}'' is not a valid double value.", tfLonValue.getText())); 252 252 return; 253 253 } -
trunk/src/org/openstreetmap/josm/gui/help/HelpBrowser.java
r2824 r2850 509 509 } 510 510 } catch(BadLocationException e) { 511 System.err.println(tr("Warning: bad location in HTML document. Exception was: " +e.toString()));511 System.err.println(tr("Warning: bad location in HTML document. Exception was: {0}", e.toString())); 512 512 e.printStackTrace(); 513 513 } -
trunk/src/org/openstreetmap/josm/gui/history/AdjustmentSynchronizer.java
r2512 r2850 15 15 16 16 import javax.swing.JCheckBox; 17 18 import org.openstreetmap.josm.tools.CheckParameterUtil; 17 19 18 20 /** … … 73 75 */ 74 76 protected void setParticipatingInSynchronizedScrolling(Adjustable adjustable, boolean isParticipating) { 75 if (adjustable == null) 76 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 77 77 CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable"); 78 78 if (! synchronizedAdjustables.contains(adjustable)) 79 throw new IllegalStateException(tr("Adjustable {0} not registered yet. Can 't set participation in synchronized adjustment.", adjustable));79 throw new IllegalStateException(tr("Adjustable {0} not registered yet. Cannot set participation in synchronized adjustment.", adjustable)); 80 80 81 81 enabledMap.put(adjustable, isParticipating); … … 113 113 * @exception IllegalArgumentException thrown, if adjustable is null 114 114 */ 115 protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalArgumentException, IllegalStateException { 116 if (adjustable == null) 117 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "adjustable")); 118 if (view == null) 119 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "view")); 115 protected void adapt(final JCheckBox view, final Adjustable adjustable) throws IllegalStateException { 116 CheckParameterUtil.ensureParameterNotNull(adjustable, "adjustable"); 117 CheckParameterUtil.ensureParameterNotNull(view, "view"); 120 118 121 119 if (! synchronizedAdjustables.contains(adjustable)) { -
trunk/src/org/openstreetmap/josm/gui/history/CoordinateInfoViewer.java
r2512 r2850 19 19 import org.openstreetmap.josm.data.osm.history.HistoryNode; 20 20 import org.openstreetmap.josm.data.osm.history.HistoryOsmPrimitive; 21 import org.openstreetmap.josm.tools.CheckParameterUtil; 21 22 22 23 /** … … 92 93 */ 93 94 public CoordinateInfoViewer(HistoryBrowserModel model) throws IllegalArgumentException{ 94 if (model == null) 95 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "model")); 95 CheckParameterUtil.ensureParameterNotNull(model, "model"); 96 96 setModel(model); 97 97 build(); -
trunk/src/org/openstreetmap/josm/gui/history/HistoryBrowserModel.java
r2655 r2850 40 40 import org.openstreetmap.josm.gui.layer.Layer; 41 41 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 42 import org.openstreetmap.josm.tools.CheckParameterUtil; 42 43 43 44 /** … … 114 115 public HistoryBrowserModel(History history) { 115 116 this(); 116 if (history == null) 117 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null", "history")); 117 CheckParameterUtil.ensureParameterNotNull(history, "history"); 118 118 setHistory(history); 119 119 } … … 225 225 */ 226 226 public TagTableModel getTagTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 227 if (pointInTimeType == null) 228 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 227 CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType"); 229 228 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 230 229 return currentTagTableModel; … … 237 236 238 237 public NodeListTableModel getNodeListTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 239 if (pointInTimeType == null) 240 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 238 CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType"); 241 239 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 242 240 return currentNodeListTableModel; … … 249 247 250 248 public RelationMemberTableModel getRelationMemberTableModel(PointInTimeType pointInTimeType) throws IllegalArgumentException { 251 if (pointInTimeType == null) 252 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 249 CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType"); 253 250 if (pointInTimeType.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 254 251 return currentRelationMemberTableModel; … … 273 270 */ 274 271 public void setReferencePointInTime(HistoryOsmPrimitive reference) throws IllegalArgumentException, IllegalStateException{ 275 if (reference == null) 276 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "reference")); 272 CheckParameterUtil.ensureParameterNotNull(reference, "reference"); 277 273 if (history == null) 278 274 throw new IllegalStateException(tr("History not initialized yet. Failed to set reference primitive.")); … … 304 300 */ 305 301 public void setCurrentPointInTime(HistoryOsmPrimitive current) throws IllegalArgumentException, IllegalStateException{ 306 if (current == null) 307 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "current")); 302 CheckParameterUtil.ensureParameterNotNull(current, "current"); 308 303 if (history == null) 309 304 throw new IllegalStateException(tr("History not initialized yet. Failed to set current primitive.")); … … 347 342 */ 348 343 public HistoryOsmPrimitive getPointInTime(PointInTimeType type) throws IllegalArgumentException { 349 if (type == null) 350 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 344 CheckParameterUtil.ensureParameterNotNull(type, "type"); 351 345 if (type.equals(PointInTimeType.CURRENT_POINT_IN_TIME)) 352 346 return current; -
trunk/src/org/openstreetmap/josm/gui/history/HistoryLoadTask.java
r2711 r2850 7 7 import java.awt.Component; 8 8 import java.io.IOException; 9 import java.text.MessageFormat; 9 10 import java.util.Collection; 10 11 import java.util.HashSet; … … 78 79 public HistoryLoadTask add(long id, OsmPrimitiveType type) throws IllegalArgumentException { 79 80 if (id <= 0) 80 throw new IllegalArgumentException(tr("Parameter ''{0}'' > 0 expected. Got {1}.", "id", id)); 81 if (type == null) 82 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "type")); 81 throw new IllegalArgumentException(MessageFormat.format("Parameter ''{0}'' > 0 expected. Got {1}.", "id", id)); 82 CheckParameterUtil.ensureParameterNotNull(type, "type"); 83 83 SimplePrimitiveId pid = new SimplePrimitiveId(id, type); 84 84 toLoad.add(pid); … … 92 92 * @return this task 93 93 */ 94 public HistoryLoadTask add(PrimitiveId pid) throws IllegalArgumentException { 95 if (pid == null) 96 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pid")); 97 if (pid.getUniqueId() <= 0) 98 throw new IllegalArgumentException(tr("id in parameter ''{0}'' > 0 expected, got {1}.", "pid", pid.getUniqueId())); 94 public HistoryLoadTask add(PrimitiveId pid) { 95 CheckParameterUtil.ensureValidPrimitiveId(pid, "pid"); 99 96 toLoad.add(pid); 100 97 return this; … … 108 105 * @throws IllegalArgumentException thrown if primitive is null 109 106 */ 110 public HistoryLoadTask add(HistoryOsmPrimitive primitive) throws IllegalArgumentException { 111 if (primitive == null) 112 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 107 public HistoryLoadTask add(HistoryOsmPrimitive primitive) { 108 CheckParameterUtil.ensureParameterNotNull(primitive, "primitive"); 113 109 toLoad.add(primitive.getPrimitiveId()); 114 110 return this; … … 122 118 * @throws IllegalArgumentException thrown if history is null 123 119 */ 124 public HistoryLoadTask add(History history)throws IllegalArgumentException { 125 if (history == null) 126 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "history")); 120 public HistoryLoadTask add(History history) { 121 CheckParameterUtil.ensureParameterNotNull(history, "history"); 127 122 toLoad.add(history.getPrimitmiveId()); 128 123 return this; … … 137 132 * @throws IllegalArgumentException thrown if primitive.getId() <= 0 138 133 */ 139 public HistoryLoadTask add(OsmPrimitive primitive) throws IllegalArgumentException { 140 if (primitive == null) 141 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitive")); 142 if (primitive.getId() <= 0) 143 throw new IllegalArgumentException(tr("Object id > 0 expected. Got {0}", primitive.getId())); 134 public HistoryLoadTask add(OsmPrimitive primitive) { 135 CheckParameterUtil.ensureValidPrimitiveId(primitive, "primitive"); 144 136 toLoad.add(primitive.getPrimitiveId()); 145 137 return this; … … 154 146 * @throws IllegalArgumentException thrown if one of the ids in the collection <= 0 155 147 */ 156 public HistoryLoadTask add(Collection<? extends OsmPrimitive> primitives) throws IllegalArgumentException{ 157 if (primitives == null) 158 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "primitives")); 148 public HistoryLoadTask add(Collection<? extends OsmPrimitive> primitives) { 149 CheckParameterUtil.ensureParameterNotNull(primitives, "primitives"); 159 150 for (OsmPrimitive primitive: primitives) { 160 151 if (primitive == null) { -
trunk/src/org/openstreetmap/josm/gui/history/VersionInfoPanel.java
r2512 r2850 23 23 import org.openstreetmap.josm.gui.JMultilineLabel; 24 24 import org.openstreetmap.josm.gui.layer.OsmDataLayer; 25 import org.openstreetmap.josm.tools.CheckParameterUtil; 25 26 import org.openstreetmap.josm.tools.UrlLabel; 26 27 … … 118 119 */ 119 120 public VersionInfoPanel(HistoryBrowserModel model, PointInTimeType pointInTimeType) throws IllegalArgumentException { 120 if (pointInTimeType == null) 121 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "pointInTimeType")); 122 if (model == null) 123 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "model")); 121 CheckParameterUtil.ensureParameterNotNull(pointInTimeType, "pointInTimeType"); 122 CheckParameterUtil.ensureParameterNotNull(model, "model"); 124 123 125 124 this.model = model; -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r2702 r2850 218 218 private void warnCantImportIntoServerLayer(GpxLayer layer) { 219 219 String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>" 220 + "Because its way points do n''t include a timestamp we can''t correlate them with audio data.</html>",220 + "Because its way points do not include a timestamp we cannot correlate them with audio data.</html>", 221 221 layer.getName() 222 222 ); … … 305 305 private void warnCantImportIntoServerLayer(GpxLayer layer) { 306 306 String msg = tr("<html>The data in the GPX layer ''{0}'' has been downloaded from the server.<br>" 307 + "Because its way points do n''t include a timestamp we can''t correlate them with images.</html>",307 + "Because its way points do not include a timestamp we cannot correlate them with images.</html>", 308 308 layer.getName() 309 309 ); … … 946 946 msg = new JPanel(new GridBagLayout()); 947 947 948 msg 949 .add( 950 new JLabel( 951 tr( 952 "<html>This action will require {0} individual<br>download requests. Do you wish<br>to continue?</html>", 953 toDownload.size())), GBC.eol()); 948 msg.add(new JLabel( 949 tr("<html>This action will require {0} individual<br>" 950 + "download requests. Do you wish<br>to continue?</html>", 951 toDownload.size())), GBC.eol()); 954 952 955 953 if (toDownload.size() > 1) { -
trunk/src/org/openstreetmap/josm/gui/layer/RawGpsLayer.java
r2618 r2850 237 237 color.addActionListener(new ActionListener(){ 238 238 public void actionPerformed(ActionEvent e) { 239 JColorChooser c = new JColorChooser(Main.pref.getColor(marktr(" gpspoint"), "layer "+getName(), Color.gray));239 JColorChooser c = new JColorChooser(Main.pref.getColor(marktr("GPS point"), "layer "+getName(), Color.gray)); 240 240 Object[] options = new Object[]{tr("OK"), tr("Cancel"), tr("Default")}; 241 241 int answer = JOptionPane.showOptionDialog( -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r2795 r2850 289 289 gc.fill = GridBagConstraints.NONE; 290 290 gc.anchor = GridBagConstraints.WEST; 291 panelTf.add(new JLabel(tr("I 'm in the timezone of: ")), gc);291 panelTf.add(new JLabel(tr("I am in the timezone of: ")), gc); 292 292 293 293 Vector<String> vtTimezones = new Vector<String>(); … … 362 362 panelLst.add(new JScrollPane(imgList), BorderLayout.CENTER); 363 363 364 JButton openButton = new JButton(tr("Open an 364 JButton openButton = new JButton(tr("Open another photo")); 365 365 openButton.addActionListener(new ActionListener() { 366 366 … … 650 650 lastNumMatched = matchGpxTrack(dateImgLst, selGpx.data, (long) (timezone * 3600) + delta); 651 651 652 return tr("<html>Matched <b>{0}</b> of <b>{1}</b> photos to GPX track.</html>", lastNumMatched, dateImgLst.size()); 652 return trn("<html>Matched <b>{0}</b> of <b>{1}</b> photo to GPX track.</html>", 653 "<html>Matched <b>{0}</b> of <b>{1}</b> photos to GPX track.</html>", 654 dateImgLst.size(), lastNumMatched, dateImgLst.size()); 653 655 } 654 656 }; … … 881 883 tfOffset.getDocument().addDocumentListener(statusBarListener); 882 884 883 lblMatches.setText(statusBarText.getText() + "<br>" + trn("(Time difference of {0} day)", "Time difference of {0} days", Math.abs(dayOffset) ));885 lblMatches.setText(statusBarText.getText() + "<br>" + trn("(Time difference of {0} day)", "Time difference of {0} days", Math.abs(dayOffset), Math.abs(dayOffset))); 884 886 885 887 statusBarListener.updateStatusBar(); … … 946 948 if(imgs.size() <= 0) { 947 949 JOptionPane.showMessageDialog(Main.parent, 948 tr("The selected photos do n't contain time information."),949 tr("Photos do n't contain time information"), JOptionPane.WARNING_MESSAGE);950 tr("The selected photos do not contain time information."), 951 tr("Photos do not contain time information"), JOptionPane.WARNING_MESSAGE); 950 952 return; 951 953 } … … 975 977 if(firstGPXDate < 0) { 976 978 JOptionPane.showMessageDialog(Main.parent, 977 tr("The selected GPX track does n't contain timestamps. Please select another one."),979 tr("The selected GPX track does not contain timestamps. Please select another one."), 978 980 tr("GPX Track has no time information"), JOptionPane.WARNING_MESSAGE); 979 981 return; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/GeoImageLayer.java
r2749 r2850 318 318 i++; 319 319 } 320 return data.size() + " " + trn("image", "images", data.size())321 + " loaded. " + tr("{0} were found to be gps tagged.", i);320 return trn("{0} image loaded.", "{0} images loaded.", data.size(), data.size()) 321 + " " + trn("{0} was found to be GPS tagged.", "{0} were found to be GPS tagged.", i, i); 322 322 } 323 323 -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticAuthorisationUI.java
r2828 r2850 236 236 String lbl = tr("Accept Access Token"); 237 237 msg.setText(tr("<html>" 238 + "You ''ve sucessfully retrieved an OAuth Access Token from the OSM website. "238 + "You have sucessfully retrieved an OAuth Access Token from the OSM website. " 239 239 + "Click on <strong>{0}</strong> to accept the token. JOSM will use it in " 240 240 + "subsequent requests to gain access to the OSM API." … … 409 409 feedbackValid(tr("Please enter your OSM user name")); 410 410 } else { 411 feedbackInvalid(tr("The user name can 't be empty. Please enter your OSM user name"));411 feedbackInvalid(tr("The user name cannot be empty. Please enter your OSM user name")); 412 412 } 413 413 } … … 430 430 feedbackValid(tr("Please enter your OSM password")); 431 431 } else { 432 feedbackInvalid(tr("The password can 't be empty. Please enter your OSM password"));432 feedbackInvalid(tr("The password cannot be empty. Please enter your OSM password")); 433 433 } 434 434 } … … 472 472 tr("<html>" 473 473 + "The automatic process for retrieving an OAuth Access Token<br>" 474 + "from the OSM server failed because JOSM was n't able to build<br>"474 + "from the OSM server failed because JOSM was not able to build<br>" 475 475 + "a valid login URL from the OAuth Authorise Endpoint URL ''{0}''.<br><br>" 476 476 + "Please check your advanced setting and try again." 477 + "</html>",477 + "</html>", 478 478 getAdvancedPropertiesPanel().getAdvancedParameters().getAuthoriseUrl() 479 479 ), -
trunk/src/org/openstreetmap/josm/gui/oauth/FullyAutomaticPropertiesPanel.java
r2801 r2850 95 95 feedbackValid(tr("Please enter your OSM user name")); 96 96 } else { 97 feedbackInvalid(tr("The user name can 't be empty. Please enter your OSM user name"));97 feedbackInvalid(tr("The user name cannot be empty. Please enter your OSM user name")); 98 98 } 99 99 } -
trunk/src/org/openstreetmap/josm/gui/oauth/ManualAuthorisationUI.java
r2801 r2850 55 55 gc.insets = new Insets(0,0,5,0); 56 56 pnlMessage= new HtmlPanel(); 57 pnlMessage.setText(tr("<html><body>" 58 + "Please enter an OAuth Access Token which is authorised to access the OSM server " 59 + "''{0}''." 60 + "</body></html>", 61 getApiUrl() 62 )); 57 pnlMessage.setText("<html><body>" 58 + tr("Please enter an OAuth Access Token which is authorised to access the OSM server " 59 + "''{0}''.", 60 getApiUrl()) + "</body></html>"); 63 61 pnl.add(pnlMessage, gc); 64 62 -
trunk/src/org/openstreetmap/josm/gui/oauth/OsmOAuthAuthorisationClient.java
r2804 r2850 297 297 String sessionId = extractOsmSession(connection); 298 298 if (sessionId == null) 299 throw new OsmOAuthAuthorisationException(tr("OSM website did n''t replya session cookie in response to ''{0}'',", url.toString()));299 throw new OsmOAuthAuthorisationException(tr("OSM website did not return a session cookie in response to ''{0}'',", url.toString())); 300 300 return sessionId; 301 301 } catch(IOException e) { -
trunk/src/org/openstreetmap/josm/gui/oauth/SemiAutomaticAuthorisationUI.java
r2804 r2850 218 218 gc.gridwidth = 2; 219 219 HtmlPanel html = new HtmlPanel(); 220 html.setText(tr("<html> <body>"220 html.setText(tr("<html>" 221 221 + "JOSM successfully retrieved a Request Token. " 222 222 + "JOSM is now launching an authorisation page in an external browser. " … … 225 225 + "<strong>{0}</strong><br><br>" 226 226 + "If launching the external browser fails you can copy the following authorise URL " 227 + "and paste it into the address field of your browser. ",227 + "and paste it into the address field of your browser.</html>", 228 228 tr("Request Access Token") 229 229 )); … … 304 304 gc.weightx = 1.0; 305 305 HtmlPanel html = new HtmlPanel(); 306 html.setText(tr("<html> <body>"306 html.setText(tr("<html>" 307 307 + "JOSM has successfully retrieved an Access Token. " 308 + "You can now accept this token. JOSM will use d itthe future for authentication "309 + "and authorisation atthe OSM server.<br><br>"310 + "The access token is: "308 + "You can now accept this token. JOSM will use it in the future for authentication " 309 + "and authorisation to the OSM server.<br><br>" 310 + "The access token is: </html>" 311 311 )); 312 312 pnl.add(html, gc); -
trunk/src/org/openstreetmap/josm/gui/oauth/TestAccessTokenTask.java
r2840 r2850 118 118 119 119 if (connection.getResponseCode() == HttpURLConnection.HTTP_FORBIDDEN) 120 throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, tr("Retrieving user details with Access Token Key ''{0}'' was forbidde d.", token.getKey()), null);120 throw new OsmApiException(HttpURLConnection.HTTP_FORBIDDEN, tr("Retrieving user details with Access Token Key ''{0}'' was forbidden.", token.getKey()), null); 121 121 122 122 if (connection.getResponseCode() != HttpURLConnection.HTTP_OK) … … 145 145 + "Successfully used the Access Token ''{0}'' to<br>" 146 146 + "access the OSM server at ''{1}''.<br>" 147 + "You ''re accessing the OSM server as user ''{2}'' with id ''{3}''."148 + "</html>",147 + "You are accessing the OSM server as user ''{2}'' with id ''{3}''." 148 + "</html>", 149 149 token.getKey(), 150 150 apiUrl, … … 235 235 tr("<html>" 236 236 + "The test failed because the server responded with an internal error.<br>" 237 + "JOSM could n''t decide whether the token is valid. Please try again later."238 + "</html>",237 + "JOSM could not decide whether the token is valid. Please try again later." 238 + "</html>", 239 239 apiUrl, 240 240 token.getKey() -
trunk/src/org/openstreetmap/josm/gui/progress/SwingRenderingProgressMonitor.java
r2512 r2850 3 3 4 4 import javax.swing.SwingUtilities; 5 6 import org.openstreetmap.josm.tools.CheckParameterUtil; 7 5 8 import static org.openstreetmap.josm.tools.I18n.tr; 6 9 … … 24 27 public SwingRenderingProgressMonitor(ProgressRenderer delegate) { 25 28 super(new CancelHandler()); 26 if (delegate == null) 27 throw new IllegalArgumentException(tr("Parameter ''{0}'' must not be null.", "delegate")); 29 CheckParameterUtil.ensureParameterNotNull(delegate, "delegate"); 28 30 this.delegate = delegate; 29 31 } -
trunk/src/org/openstreetmap/josm/gui/widgets/BoundingBoxSelectionPanel.java
r2711 r2850 158 158 value = Double.parseDouble(getComponent().getText()); 159 159 } catch(NumberFormatException ex) { 160 feedbackInvalid(tr("The string ''{0}'' is n''t a valid double value.", getComponent().getText()));160 feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText())); 161 161 return; 162 162 } … … 198 198 value = Double.parseDouble(getComponent().getText()); 199 199 } catch(NumberFormatException ex) { 200 feedbackInvalid(tr("The string ''{0}'' is n''t a valid double value.", getComponent().getText()));200 feedbackInvalid(tr("The string ''{0}'' is not a valid double value.", getComponent().getText())); 201 201 return; 202 202 }
Note:
See TracChangeset
for help on using the changeset viewer.