- Timestamp:
- 2023-08-14T17:34:52+02:00 (18 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r18173 r18805 83 83 84 84 private static class Server { 85 publicfinal String name;86 publicfinal BiFunction<String, Collection<SearchResult>, URL> urlFunction;87 publicfinal String thirdcol;88 publicfinal String fourthcol;85 final String name; 86 final BiFunction<String, Collection<SearchResult>, URL> urlFunction; 87 final String thirdcol; 88 final String fourthcol; 89 89 90 90 Server(String n, BiFunction<String, Collection<SearchResult>, URL> u, String t, String f) { … … 133 133 /** 134 134 * Adds a new tab to the download dialog in JOSM. 135 * 135 * <p> 136 136 * This method is, for all intents and purposes, the constructor for this class. 137 137 */ … … 192 192 public void actionPerformed(ActionEvent e) { 193 193 String searchExpression = cbSearchExpression.getText(); 194 if (!isEnabled() || searchExpression.trim().isEmpty()) 194 if (!isEnabled() || searchExpression.trim().isEmpty() || serverComboBox.getSelectedItem() == null) 195 195 return; 196 196 cbSearchExpression.addCurrentItemToHistory(); … … 298 298 JOptionPane.WARNING_MESSAGE, null 299 299 )); 300 generateLastException(e); 300 301 } 301 302 } catch (IOException | ParserConfigurationException e) { 302 if (!canceled) { 303 OsmTransferException ex = new OsmTransferException(e); 304 ex.setUrl(url.toString()); 305 lastException = ex; 306 } 303 generateLastException(e); 304 } 305 } 306 307 /** 308 * Generate an {@link OsmTransferException} that will be stored in {@link #lastException} if the operation is 309 * not cancelled. 310 * @param throwable The throwable to store as an {@link OsmTransferException} 311 */ 312 private void generateLastException(Throwable throwable) { 313 if (!canceled) { 314 OsmTransferException ex = new OsmTransferException(throwable); 315 ex.setUrl(url.toString()); 316 lastException = ex; 307 317 } 308 318 } … … 337 347 } 338 348 349 /** 350 * Add data to the table 351 * @param data The data to add 352 */ 339 353 public void addData(List<SearchResult> data) { 340 354 this.data.addAll(data); … … 403 417 } 404 418 419 /** 420 * Set the header column values for the third and fourth columns 421 * @param third The new header for the third column 422 * @param fourth The new header for the fourth column 423 */ 405 424 public void setHeadlines(String third, String fourth) { 406 425 col3.setHeaderValue(third);
Note:
See TracChangeset
for help on using the changeset viewer.