Implement Icon to remain compatible
authorTomas Holy <t_h@netbeans.org>
Thu, 12 Feb 2009 13:52:15 +0100
changeset 50877efa5e86492
parent 507 1aa0ae41dfe8
child 510 fb386a50fcc0
Implement Icon to remain compatible
openide.util/src/org/openide/util/ImageUtilities.java
     1.1 --- a/openide.util/src/org/openide/util/ImageUtilities.java	Wed Feb 11 17:25:50 2009 +0100
     1.2 +++ b/openide.util/src/org/openide/util/ImageUtilities.java	Thu Feb 12 13:52:15 2009 +0100
     1.3 @@ -701,7 +701,7 @@
     1.4      /**
     1.5       * Image with tool tip text (for icons with badges)
     1.6       */
     1.7 -    private static class ToolTipImage extends BufferedImage {
     1.8 +    private static class ToolTipImage extends BufferedImage implements Icon {
     1.9          final String toolTipText;
    1.10          ImageIcon imageIcon;
    1.11  
    1.12 @@ -745,5 +745,17 @@
    1.13              }
    1.14              return imageIcon;
    1.15          }
    1.16 +
    1.17 +        public int getIconHeight() {
    1.18 +            return super.getHeight();
    1.19 +        }
    1.20 +
    1.21 +        public int getIconWidth() {
    1.22 +            return super.getWidth();
    1.23 +        }
    1.24 +
    1.25 +        public void paintIcon(Component c, Graphics g, int x, int y) {
    1.26 +            g.drawImage(this, x, y, null);
    1.27 +        }
    1.28      }
    1.29  }