Deprecating Utilities.*image* related methods and replacing them with their ImageUtilities peers
1.1 --- a/openide.util/src/org/openide/util/Utilities.java Thu Sep 25 12:32:45 2008 -0400
1.2 +++ b/openide.util/src/org/openide/util/Utilities.java Fri Sep 26 10:19:31 2008 +0200
1.3 @@ -2601,13 +2601,14 @@
1.4 * over the first one with its top-left corner at x, y. Images need not be of the same size.
1.5 * New image will have a size of max(second image size + top-left corner, first image size).
1.6 * Method is used mostly when second image contains transparent pixels (e.g. for badging).
1.7 - * <p>Please use {@link ImageUtilities#mergeImages}.
1.8 * @param image1 underlying image
1.9 * @param image2 second image
1.10 * @param x x position of top-left corner
1.11 * @param y y position of top-left corner
1.12 * @return new merged image
1.13 + * @deprecated Use {@link ImageUtilities#mergeImages}.
1.14 */
1.15 + @Deprecated
1.16 public static final Image mergeImages(Image image1, Image image2, int x, int y) {
1.17 return ImageUtilities.mergeImages(image1, image2, x, y);
1.18 }
1.19 @@ -2615,21 +2616,23 @@
1.20 /**
1.21 * Loads an image from the specified resource ID. The image is loaded using the "system" classloader registered in
1.22 * Lookup.
1.23 - * <p>Please use {@link ImageUtilities#loadImage(java.lang.String)}.
1.24 * @param resourceID resource path of the icon (no initial slash)
1.25 * @return icon's Image, or null, if the icon cannot be loaded.
1.26 + * @deprecated Use {@link ImageUtilities#loadImage(java.lang.String)}.
1.27 */
1.28 + @Deprecated
1.29 public static final Image loadImage(String resourceID) {
1.30 return ImageUtilities.loadImage(resourceID);
1.31 }
1.32
1.33 /**
1.34 * Converts given icon to a {@link java.awt.Image}.
1.35 - * <p>Please use {@link ImageUtilities#icon2Image}.
1.36 *
1.37 * @param icon {@link javax.swing.Icon} to be converted.
1.38 * @since 7.3
1.39 + * @deprecated Use {@link ImageUtilities#icon2Image}.
1.40 */
1.41 + @Deprecated
1.42 public static final Image icon2Image(Icon icon) {
1.43 return ImageUtilities.icon2Image(icon);
1.44 }
1.45 @@ -2818,10 +2821,11 @@
1.46 * or <samp>org/netbeans/modules/foo/resources/foo_mybranding.gif</samp>.
1.47 *
1.48 * <p>Caching of loaded images can be used internally to improve performance.
1.49 - * <p>Please use {@link ImageUtilities#loadImage(java.lang.String, boolean)}.
1.50 *
1.51 * @since 3.24
1.52 + * @deprecated Use {@link ImageUtilities#loadImage(java.lang.String, boolean)}.
1.53 */
1.54 + @Deprecated
1.55 public static final Image loadImage(String resource, boolean localized) {
1.56 return ImageUtilities.loadImage(resource, localized);
1.57 }