Changeset 33211 in osm for applications
- Timestamp:
- 2017-04-06T10:08:33+02:00 (8 years ago)
- Location:
- applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer
- Files:
-
- 1 deleted
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/Tile.java
r33209 r33211 41 41 protected int zoom; 42 42 protected BufferedImage image; 43 protected TileAnchor anchor;44 43 protected String key; 45 44 protected volatile boolean loaded; // field accessed by multiple threads without any monitors, needs to be volatile … … 241 240 } 242 241 243 /** 244 * Get the position of the tile inside the image. 245 * @return the position of the tile inside the image 246 * @see #getImage() 247 */ 248 public TileAnchor getAnchor() { 249 return anchor; 250 } 251 252 public final synchronized void setImage(BufferedImage image) { 253 if (image == null) { 254 this.image = null; 255 this.anchor = null; 256 } else { 257 this.image = image; 258 this.anchor = new TileAnchor( 259 new Point.Double(0, 0), 260 new Point.Double(image.getWidth(), image.getHeight())); 261 } 242 public final void setImage(BufferedImage image) { 243 this.image = image; 262 244 } 263 245
Note:
See TracChangeset
for help on using the changeset viewer.