Changeset 7083 in josm for trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java
- Timestamp:
- 2014-05-09T06:03:50+02:00 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/org/openstreetmap/josm/gui/mappaint/MapImage.java
r6711 r7083 1 1 // License: GPL. For details, see LICENSE file. 2 2 package org.openstreetmap.josm.gui.mappaint; 3 4 import static org.openstreetmap.josm.tools.Utils.equal;5 3 6 4 import java.awt.Image; 7 5 import java.awt.Rectangle; 8 6 import java.awt.image.BufferedImage; 7 import java.util.Objects; 9 8 10 9 import javax.swing.ImageIcon; … … 19 18 20 19 public class MapImage { 21 20 22 21 private static final int MAX_SIZE = 48; 23 22 24 23 /** 25 24 * ImageIcon can change while the image is loading. … … 158 157 return new MapImageBoxProvider(); 159 158 } 160 159 161 160 /** 162 161 * Returns the really displayed node icon for this {@code MapImage}. … … 174 173 } 175 174 } 176 175 177 176 private boolean mustRescale(Image image) { 178 return ((width == -1 && image.getWidth(null) > MAX_SIZE) 177 return ((width == -1 && image.getWidth(null) > MAX_SIZE) 179 178 && (height == -1 && image.getHeight(null) > MAX_SIZE)); 180 179 } … … 187 186 // img changes when image is fully loaded and can't be used for equality check. 188 187 return alpha == other.alpha && 189 equal(name, other.name) &&190 equal(source, other.source) &&188 Objects.equals(name, other.name) && 189 Objects.equals(source, other.source) && 191 190 width == other.width && 192 191 height == other.height;
Note:
See TracChangeset
for help on using the changeset viewer.