Changeset 6310 in josm for trunk/src/org/openstreetmap/josm/gui
- Timestamp:
- 2013-10-07T00:04:48+02:00 (10 years ago)
- Location:
- trunk/src/org/openstreetmap/josm/gui
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/ExtendedDialog.java
r6221 r6310 438 438 x = JOptionPane.getFrameForComponent(parent).getSize(); 439 439 } 440 } catch(NullPointerException e) { } 440 } catch(NullPointerException e) { 441 Main.warn(e); 442 } 441 443 return x; 442 444 } -
trunk/src/org/openstreetmap/josm/gui/MapStatus.java
r6296 r6310 218 218 synchronized (this) { 219 219 // TODO Would be better if the timeout wasn't necessary 220 try {wait(1000);} catch (InterruptedException e) {} 220 try { 221 wait(1000); 222 } catch (InterruptedException e) { 223 Main.warn(e); 224 } 221 225 ms.modifiers = mouseState.modifiers; 222 226 ms.mousePos = mouseState.mousePos; … … 337 341 }); 338 342 } catch (Exception e) { 339 343 Main.warn(e); 340 344 } 341 345 } -
trunk/src/org/openstreetmap/josm/gui/NavigatableComponent.java
r6258 r6310 478 478 */ 479 479 public void smoothScrollTo(EastNorth newCenter) { 480 // fixmemake these configurable.480 // FIXME make these configurable. 481 481 final int fps = 20; // animation frames per second 482 482 final int speed = 1500; // milliseconds for full-screen-width pan … … 491 491 @Override 492 492 public void run() { 493 for (int i=0; i<frames; i++) 494 { 495 // fixme - not use zoom history here 493 for (int i=0; i<frames; i++) { 494 // FIXME - not use zoom history here 496 495 zoomTo(oldCenter.interpolate(finalNewCenter, (i+1) / frames)); 497 try { Thread.sleep(1000 / fps); } catch (InterruptedException ex) { } 496 try { 497 Thread.sleep(1000 / fps); 498 } catch (InterruptedException ex) { 499 Main.warn(ex); 500 } 498 501 } 499 502 } -
trunk/src/org/openstreetmap/josm/gui/bbox/TileSelectionBBoxChooser.java
r6248 r6310 408 408 Point min = new Point(valMinX.getTileIndex(), valMinY.getTileIndex()); 409 409 Point max = new Point(valMaxX.getTileIndex(), valMaxY.getTileIndex()); 410 if (min.x > max.x) {411 412 }413 410 int zoomlevel = (Integer)spZoomLevel.getValue(); 414 411 TileBounds tb = new TileBounds(min, max, zoomlevel); -
trunk/src/org/openstreetmap/josm/gui/dialogs/properties/TagEditHelper.java
r6246 r6310 620 620 return; 621 621 } 622 } catch (NumberFormatException ex) { } 622 } catch (NumberFormatException ex) { 623 Main.warn(ex); 624 } 623 625 JOptionPane.showMessageDialog(this, tr("Please enter integer number between 0 and {0}", MAX_LRU_TAGS_NUMBER)); 624 626 -
trunk/src/org/openstreetmap/josm/gui/download/PlaceSelection.java
r6235 r6310 259 259 @Override 260 260 public void endElement(String namespaceURI, String localName, String qName) throws SAXException { 261 if (qName.equals("searchresults")) { 262 } else if (qName.equals("description") && description != null) { 261 if (qName.equals("description") && description != null) { 263 262 currentResult.description = description.toString(); 264 263 description = null; 265 264 } 266 265 depth--; 267 268 266 } 269 267 -
trunk/src/org/openstreetmap/josm/gui/layer/GpxLayer.java
r6248 r6310 243 243 return colorModes.values()[i]; 244 244 } catch (Exception e) { 245 Main.warn(e); 245 246 } 246 247 return colorModes.none; -
trunk/src/org/openstreetmap/josm/gui/layer/TMSLayer.java
r6248 r6310 115 115 defPath = OsmFileCacheTileLoader.getDefaultCacheDir().getAbsolutePath(); 116 116 } catch (SecurityException e) { 117 Main.warn(e); 117 118 } 118 119 PROP_TILECACHE_DIR = new StringProperty(PREFERENCE_PREFIX + ".tilecache_path", defPath); … … 139 140 return loader; 140 141 } catch (IOException e) { 142 Main.warn(e); 141 143 } 142 144 } … … 146 148 147 149 /** 148 * Plugins that wish to set custom tile loader should call this method149 */150 * Plugins that wish to set custom tile loader should call this method 151 */ 150 152 public static void setCustomTileLoaderFactory(TileLoaderFactory loaderFactory) { 151 153 TMSLayer.loaderFactory = loaderFactory; -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/CorrelateGpxWithImages.java
r6296 r6310 348 348 orientation = ExifReader.readOrientation(yLayer.data.get(index).getFile()); 349 349 } catch (Exception e) { 350 Main.warn(e); 350 351 } 351 352 imgDisp.setImage(yLayer.data.get(index).getFile(), orientation); … … 381 382 orientation = ExifReader.readOrientation(sel); 382 383 } catch (Exception e) { 384 Main.warn(e); 383 385 } 384 386 imgDisp.setImage(sel, orientation); … … 388 390 date = ExifReader.readTime(sel); 389 391 } catch (Exception e) { 392 Main.warn(e); 390 393 } 391 394 if (date != null) { -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ImageDisplay.java
r6296 r6310 80 80 Thread.sleep(5); 81 81 } catch (InterruptedException e) { 82 Main.warn(e); 82 83 } 83 84 } -
trunk/src/org/openstreetmap/josm/gui/layer/geoimage/ThumbsLoader.java
r6281 r6310 82 82 BufferedImage scaledBI = new BufferedImage(targetSize.width, targetSize.height, BufferedImage.TYPE_INT_RGB); 83 83 Graphics2D g = scaledBI.createGraphics(); 84 while (!g.drawImage(img, 0, 0, targetSize.width, targetSize.height, null)) 85 { 84 while (!g.drawImage(img, 0, 0, targetSize.width, targetSize.height, null)) { 86 85 try { 87 86 Thread.sleep(10); 88 } catch(InterruptedException ie) {} 87 } catch(InterruptedException ie) { 88 Main.warn(ie); 89 } 89 90 } 90 91 g.dispose(); -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/Marker.java
r6299 r6310 233 233 double syncOffset = Double.parseDouble(exts.get("sync-offset")); 234 234 audioMarker.syncOffset = syncOffset; 235 } catch (NumberFormatException nfe) {} 235 } catch (NumberFormatException nfe) { 236 Main.warn(nfe); 237 } 236 238 } 237 239 return audioMarker; -
trunk/src/org/openstreetmap/josm/gui/layer/markerlayer/MarkerLayer.java
r6248 r6310 115 115 try { 116 116 offset = Double.parseDouble(exts.get("offset")); 117 } catch (NumberFormatException nfe) {} 117 } catch (NumberFormatException nfe) { 118 Main.warn(nfe); 119 } 118 120 } 119 121 if (offset == null) { -
trunk/src/org/openstreetmap/josm/gui/mappaint/Cascade.java
r6285 r6310 126 126 return f; 127 127 } catch (NumberFormatException e) { 128 Main.warn(e); 128 129 } 129 130 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/LineElemStyle.java
r5801 r6310 8 8 import java.util.Arrays; 9 9 10 import org.openstreetmap.josm.Main; 10 11 import org.openstreetmap.josm.data.osm.Node; 11 12 import org.openstreetmap.josm.data.osm.OsmPrimitive; … … 137 138 /* if we have a "width" tag, try use it */ 138 139 String widthTag = env.osm.get("width"); 139 if (widthTag == null) {140 if (widthTag == null) { 140 141 widthTag = env.osm.get("est_width"); 141 142 } 142 if (widthTag != null) {143 if (widthTag != null) { 143 144 try { 144 145 realWidth = Float.valueOf(widthTag); 145 } 146 catch(NumberFormatException nfe) {146 } catch(NumberFormatException nfe) { 147 Main.warn(nfe); 147 148 } 148 149 } -
trunk/src/org/openstreetmap/josm/gui/mappaint/xml/XmlStyleSource.java
r6289 r6310 75 75 Main.JOSM_WEBSITE+"/mappaint-style-1.0", 76 76 "resource://data/mappaint-style.xsd"); 77 while (parser.hasNext()) { 78 } 77 while (parser.hasNext()); 79 78 } finally { 80 79 closeSourceInputStream(in); … … 328 327 int numOver = 0, numUnder = 0; 329 328 330 while (mc.hasLayer(String.format("over_%d", ++numOver))) {}331 while (mc.hasLayer(String.format("under_%d", ++numUnder))) {}329 while (mc.hasLayer(String.format("over_%d", ++numOver))); 330 while (mc.hasLayer(String.format("under_%d", ++numUnder))); 332 331 333 332 for (LinemodPrototype mod : p.linemods) { -
trunk/src/org/openstreetmap/josm/gui/preferences/PreferenceTabbedPane.java
r6223 r6310 419 419 setSelectedComponent(sel); 420 420 } 421 } catch (IllegalArgumentException e) {} 421 } catch (IllegalArgumentException e) { 422 Main.warn(e); 423 } 422 424 } 423 425 -
trunk/src/org/openstreetmap/josm/gui/preferences/projection/GaussKruegerProjectionChoice.java
r6295 r6310 6 6 import java.util.Collection; 7 7 import java.util.Collections; 8 9 import org.openstreetmap.josm.Main; 8 10 9 11 public class GaussKruegerProjectionChoice extends ListProjectionChoice { … … 32 34 try { 33 35 return Integer.parseInt(zone) - 2; 34 } catch(NumberFormatException e) {} 36 } catch(NumberFormatException e) { 37 Main.warn(e); 38 } 35 39 return defaultIndex; 36 40 } … … 46 50 47 51 @Override 48 public Collection<String> getPreferencesFromCode(String code) 49 { 52 public Collection<String> getPreferencesFromCode(String code) { 50 53 //zone 2 = EPSG:31466 up to zone 5 = EPSG:31469 51 54 for (int zone = 2; zone <= 5; zone++) {
Note:
See TracChangeset
for help on using the changeset viewer.