- Timestamp:
- 2015-05-17T17:21:01+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/HelpAwareOptionPane.java
r7466 r8387 244 244 ); 245 245 246 pane.getValue();247 246 final JDialog dialog = new JDialog( 248 247 JOptionPane.getFrameForComponent(parentComponent), -
trunk/src/org/openstreetmap/josm/gui/MainApplication.java
r8377 r8387 559 559 } 560 560 } 561 } catch (Exception e) { 561 } catch (IOException | SecurityException e) { 562 if (Main.isDebugEnabled()) { 563 Main.debug("Exception while checking IPv6 connectivity: "+e); 564 } 562 565 } 563 566 if(wasv6 && !hasv6) { -
trunk/src/org/openstreetmap/josm/gui/bbox/SlippyMapBBoxChooser.java
r8384 r8387 306 306 307 307 this.bbox = bbox; 308 double minLon = bbox.getMinLon();309 double maxLon = bbox.getMaxLon();310 311 if (bbox.crosses180thMeridian()) {312 minLon -= 360.0;313 }314 315 308 iSelectionRectStart = new Coordinate(bbox.getMinLat(), bbox.getMinLon()); 316 309 iSelectionRectEnd = new Coordinate(bbox.getMaxLat(), bbox.getMaxLon()); 317 310 318 311 // calc the screen coordinates for the new selection rectangle 319 MapMarkerDot xmin_ymin = new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon());320 MapMarkerDot xmax_ymax = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon());312 MapMarkerDot min = new MapMarkerDot(bbox.getMinLat(), bbox.getMinLon()); 313 MapMarkerDot max = new MapMarkerDot(bbox.getMaxLat(), bbox.getMaxLon()); 321 314 322 315 List<MapMarker> marker = new ArrayList<>(2); 323 marker.add( xmin_ymin);324 marker.add( xmax_ymax);316 marker.add(min); 317 marker.add(max); 325 318 setMapMarkerList(marker); 326 319 setDisplayToFitMapMarkers(); -
trunk/src/org/openstreetmap/josm/gui/dialogs/CommandStackDialog.java
r8308 r8387 376 376 public void actionPerformed(ActionEvent e) { 377 377 TreePath path; 378 undoTree.getSelectionPath();379 378 if (!undoTree.isSelectionEmpty()) { 380 379 path = undoTree.getSelectionPath(); … … 386 385 OsmDataLayer editLayer = Main.main.getEditLayer(); 387 386 if (editLayer == null) return; 388 editLayer.data.setSelected( 387 editLayer.data.setSelected(getAffectedPrimitives(path)); 389 388 } 390 389 -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/PropertiesCellRenderer.java
r8365 r8387 10 10 import java.awt.Font; 11 11 import java.util.Map; 12 import java.util.Objects; 12 13 13 14 import javax.swing.JLabel; … … 65 66 if (otherCount == 1) { 66 67 for (Map.Entry<?, ?> entry : v.entrySet()) { // Find the non-blank value in the map 67 if ( entry.getKey() != "") {68 if (!Objects.equals(entry.getKey(), "")) { 68 69 /* I18n: properties display partial string joined with comma, frst is count, second is value */ 69 70 sb.append(tr("{0} ''{1}''", entry.getValue().toString(), entry.getKey())); -
trunk/src/org/openstreetmap/josm/gui/preferences/plugin/PluginPreference.java
r8379 r8387 124 124 */ 125 125 public static void notifyDownloadResults(final Component parent, PluginDownloadTask task, boolean restartRequired) { 126 final Collection<PluginInformation> downloaded = task.getDownloadedPlugins();127 126 final Collection<PluginInformation> failed = task.getFailedPlugins(); 128 127 final StringBuilder sb = new StringBuilder(); -
trunk/src/org/openstreetmap/josm/gui/progress/PleaseWaitProgressMonitor.java
r6084 r8387 3 3 4 4 import java.awt.Component; 5 import java.awt.Dialog;6 import java.awt.Frame;7 import java.awt.Window;8 5 import java.awt.event.ActionEvent; 9 6 import java.awt.event.ActionListener; … … 35 32 36 33 public static final int PROGRESS_BAR_MAX = 10000; 37 private final WindowdialogParent;34 private final Component dialogParent; 38 35 39 36 private int currentProgressValue = 0; … … 154 151 public void run() { 155 152 Main.currentProgressMonitor = PleaseWaitProgressMonitor.this; 156 if (dialogParent instanceof Frame && dialog == null) { 157 dialog = new PleaseWaitDialog(dialogParent); 158 } else if (dialogParent instanceof Dialog && dialog == null) { 153 if (dialogParent != null && dialog == null) { 159 154 dialog = new PleaseWaitDialog(dialogParent); 160 155 } else 161 throw new ProgressException("PleaseWaitDialog parent must be either Frame or Dialog");156 throw new ProgressException("PleaseWaitDialog parent must be set"); 162 157 163 158 if (windowTitle != null) { -
trunk/src/org/openstreetmap/josm/gui/tagging/ac/AutoCompletionItemPriority.java
r8130 r8387 88 88 @Override 89 89 public int compareTo(AutoCompletionItemPriority other) { 90 int ui = -Integer.compare(userInput, other.userInput);90 int ui = Integer.compare(other.userInput, userInput); 91 91 if (ui != 0) return ui; 92 92 -
trunk/src/org/openstreetmap/josm/io/CachedFile.java
r8073 r8387 468 468 checkOfflineAccess(downloadString); 469 469 470 HttpURLConnection con = null;471 470 int numRedirects = 0; 472 471 while(true) { 473 con = Utils.openHttpConnection(downloadUrl); 474 if (con == null) { 475 throw new IOException("Cannot open http connection to "+downloadString); 476 } 472 HttpURLConnection con = Utils.openHttpConnection(downloadUrl); 477 473 if (ifModifiedSince != null) { 478 474 con.setIfModifiedSince(ifModifiedSince); -
trunk/src/org/openstreetmap/josm/io/InvalidXmlCharacterFilter.java
r7937 r8387 62 62 63 63 private char filter(char in) { 64 if (in < 0x20 && in >= 0 &&INVALID_CHARS[in]) {64 if (in < 0x20 && INVALID_CHARS[in]) { 65 65 if (firstWarning) { 66 66 Main.warn("Invalid xml character encountered: '"+in+"'."); -
trunk/src/org/openstreetmap/josm/tools/Geometry.java
r8384 r8387 631 631 for (Node n : way.getNodes()) { 632 632 if (lastN != null) { 633 n.getEastNorth().getX();634 635 633 area += (calcX(n) * calcY(lastN)) - (calcY(n) * calcX(lastN)); 636 634 } -
trunk/src/org/openstreetmap/josm/tools/ImageOverlay.java
r8365 r8387 84 84 int x, y; 85 85 if (width == -1 && offsetLeft < 0) { 86 x = new Double(w*offsetRight).intValue() - overlay.getIconWidth();86 x = (int)(w*offsetRight) - overlay.getIconWidth(); 87 87 } else { 88 x = new Double(w*offsetLeft).intValue();88 x = (int)(w*offsetLeft); 89 89 } 90 90 if (height == -1 && offsetTop < 0) { 91 y = new Double(h*offsetBottom).intValue() - overlay.getIconHeight();91 y = (int)(h*offsetBottom) - overlay.getIconHeight(); 92 92 } else { 93 y = new Double(h*offsetTop).intValue();93 y = (int)(h*offsetTop); 94 94 } 95 95 overlay.paintIcon(null, ground.getGraphics(), x, y);
Note:
See TracChangeset
for help on using the changeset viewer.