Changeset 24686 in osm for applications
- Timestamp:
- 2010-12-10T16:00:47+01:00 (14 years ago)
- Location:
- applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery/ImageryLayer.java
r24672 r24686 1 1 package org.openstreetmap.josm.plugins.imagery; 2 2 3 import static org.openstreetmap.josm.tools.I18n.tr; 3 4 import static org.openstreetmap.josm.tools.I18n.trc; 4 5 6 import java.awt.Color; 5 7 import java.awt.Component; 6 8 import java.awt.Container; 9 import java.awt.Font; 10 import java.awt.Graphics; 7 11 import java.awt.Toolkit; 8 12 import java.awt.event.ActionEvent; … … 177 181 return op.filter(tmp, null); 178 182 } 183 184 public void drawErrorTile(BufferedImage img) { 185 Graphics g = img.getGraphics(); 186 g.setColor(Color.RED); 187 g.fillRect(0, 0, img.getWidth(), img.getHeight()); 188 g.setFont(g.getFont().deriveFont(Font.PLAIN).deriveFont(36.0f)); 189 g.setColor(Color.BLACK); 190 g.drawString(tr("ERROR"), 30, img.getHeight()/2); 191 } 179 192 } -
applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery/tms/TMSLayer.java
r24684 r24686 16 16 import java.awt.font.TextAttribute; 17 17 import java.awt.geom.Rectangle2D; 18 import java.awt.image.BufferedImage; 18 19 import java.awt.image.ImageObserver; 19 20 import java.io.IOException; … … 80 81 public synchronized void tileLoadingFinished(Tile tile, boolean success) 81 82 { 83 if (!success) { 84 BufferedImage img = new BufferedImage(tileSource.getTileSize(),tileSource.getTileSize(), BufferedImage.TYPE_INT_RGB); 85 drawErrorTile(img); 86 tile.setImage(img); 87 } 82 88 tile.setLoaded(true); 83 89 needRedraw = true; 84 90 Main.map.repaint(100); 85 91 tileRequestsOutstanding.remove(tile); 86 if (sharpenLevel != 0 ) tile.setImage(sharpenImage(tile.getImage()));92 if (sharpenLevel != 0 && success) tile.setImage(sharpenImage(tile.getImage())); 87 93 if (debug) 88 94 out("tileLoadingFinished() tile: " + tile + " success: " + success); -
applications/editors/josm/plugins/imagery/src/org/openstreetmap/josm/plugins/imagery/wms/GeorefImage.java
r24615 r24686 72 72 { 73 73 BufferedImage img = createImage(); 74 Graphics g = img.getGraphics(); 75 g.setColor(Color.RED); 76 g.fillRect(0, 0, img.getWidth(), img.getHeight()); 77 g.setFont(g.getFont().deriveFont(Font.PLAIN).deriveFont(36.0f)); 78 g.setColor(Color.BLACK); 79 g.drawString(tr("Exception occurred"), 10, img.getHeight()/2); 74 layer.drawErrorTile(img); 80 75 this.image = img; 81 76 break;
Note:
See TracChangeset
for help on using the changeset viewer.