Changeset 32180 in osm
- Timestamp:
- 2016-05-15T15:33:36+02:00 (9 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/JMapViewer.java
r32083 r32180 10 10 import java.awt.event.ActionListener; 11 11 import java.awt.event.MouseEvent; 12 import java.net.URL; 12 13 import java.util.Collections; 13 14 import java.util.LinkedList; … … 170 171 add(zoomSlider); 171 172 int size = 18; 172 try { 173 ImageIcon icon = new ImageIcon(JMapViewer.class.getResource("images/plus.png")); 173 URL url = JMapViewer.class.getResource("images/plus.png"); 174 if (url != null) { 175 ImageIcon icon = new ImageIcon(url); 174 176 zoomInButton = new JButton(icon); 175 } catch (Exception e){177 } else { 176 178 zoomInButton = new JButton("+"); 177 179 zoomInButton.setFont(new Font("sansserif", Font.BOLD, 9)); … … 188 190 zoomInButton.setFocusable(false); 189 191 add(zoomInButton); 190 try { 191 ImageIcon icon = new ImageIcon(JMapViewer.class.getResource("images/minus.png")); 192 url = JMapViewer.class.getResource("images/minus.png"); 193 if (url != null) { 194 ImageIcon icon = new ImageIcon(url); 192 195 zoomOutButton = new JButton(icon); 193 } catch (Exception e){196 } else { 194 197 zoomOutButton = new JButton("-"); 195 198 zoomOutButton.setFont(new Font("sansserif", Font.BOLD, 9)); -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/MemoryTileCache.java
r31790 r32180 78 78 removeEntry(lruTiles.getLastElement()); 79 79 } 80 } catch ( Exception e) {80 } catch (NullPointerException e) { 81 81 log.warning(e.getMessage()); 82 82 } -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/OsmTileLoader.java
r32007 r32180 62 62 tile.setLoaded(true); 63 63 listener.tileLoadingFinished(tile, true); 64 } catch ( Exception e) {64 } catch (IOException e) { 65 65 tile.setError(e.getMessage()); 66 66 listener.tileLoadingFinished(tile, false); -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
r31790 r32180 82 82 try { 83 83 return ImageIO.read(JMapViewer.class.getResourceAsStream(path)); 84 } catch ( Exception ex) {84 } catch (IOException | IllegalArgumentException ex) { 85 85 ex.printStackTrace(); 86 86 return null; -
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/tilesources/BingAerialTileSource.java
r32025 r32180 290 290 } 291 291 return a.toString(); 292 } catch ( Exception e) {292 } catch (RuntimeException e) { 293 293 e.printStackTrace(); 294 294 }
Note:
See TracChangeset
for help on using the changeset viewer.