Ignore:
Timestamp:
2015-05-04T23:24:14+02:00 (10 years ago)
Author:
Don-vip
Message:

squid:S1133 - remove deprecated code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/org/openstreetmap/josm/tools/ImageProvider.java

    r8323 r8324  
    5252import javax.imageio.metadata.IIOMetadata;
    5353import javax.imageio.stream.ImageInputStream;
    54 import javax.swing.Icon;
    5554import javax.swing.ImageIcon;
    5655import javax.xml.bind.DatatypeConverter;
     
    11441143        return Toolkit.getDefaultToolkit().createCustomCursor(img.getImage(),
    11451144                "crosshair".equals(name) ? new Point(10, 10) : new Point(3, 2), "Cursor");
    1146     }
    1147 
    1148     /**
    1149      * Decorate one icon with an overlay icon.
    1150      *
    1151      * @param ground the base image
    1152      * @param overlay the overlay image (can be smaller than the base image)
    1153      * @param pos position of the overlay image inside the base image (positioned
    1154      * in one of the corners)
    1155      * @return an icon that represent the overlay of the two given icons. The second icon is layed
    1156      * on the first relative to the given position.
    1157      * FIXME: This function does not fit into the ImageProvider concept as public function!
    1158      * Overlay should be handled like all the other functions only settings arguments and
    1159      * overlay must be transparent in the background.
    1160      * Also scaling is not cared about with current implementation.
    1161      * @deprecated this method will be refactored
    1162      */
    1163     @Deprecated
    1164     public static ImageIcon overlay(Icon ground, Icon overlay, OverlayPosition pos) {
    1165         int w = ground.getIconWidth();
    1166         int h = ground.getIconHeight();
    1167         int wo = overlay.getIconWidth();
    1168         int ho = overlay.getIconHeight();
    1169         BufferedImage img = new BufferedImage(w, h, BufferedImage.TYPE_INT_ARGB);
    1170         Graphics g = img.createGraphics();
    1171         ground.paintIcon(null, g, 0, 0);
    1172         int x = 0, y = 0;
    1173         switch (pos) {
    1174         case NORTHWEST:
    1175             x = 0;
    1176             y = 0;
    1177             break;
    1178         case NORTHEAST:
    1179             x = w - wo;
    1180             y = 0;
    1181             break;
    1182         case SOUTHWEST:
    1183             x = 0;
    1184             y = h - ho;
    1185             break;
    1186         case SOUTHEAST:
    1187             x = w - wo;
    1188             y = h - ho;
    1189             break;
    1190         }
    1191         overlay.paintIcon(null, g, x, y);
    1192         return new ImageIcon(img);
    11931145    }
    11941146
Note: See TracChangeset for help on using the changeset viewer.