Class BufferedImageIcon

  • All Implemented Interfaces:
    javax.swing.Icon

    public class BufferedImageIcon
    extends java.lang.Object
    implements javax.swing.Icon
    An Icon implementation backed by a BufferedImage.
    Version:
    $Id: //depot/branches/personal/haraldk/twelvemonkeys/release-2/twelvemonkeys-core/src/main/java/com/twelvemonkeys/image/BufferedImageIcon.java#2 $
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private boolean fast  
      private int height  
      private java.awt.image.BufferedImage image  
      private int width  
    • Constructor Summary

      Constructors 
      Constructor Description
      BufferedImageIcon​(java.awt.image.BufferedImage pImage)  
      BufferedImageIcon​(java.awt.image.BufferedImage pImage, int pWidth, int pHeight)  
      BufferedImageIcon​(java.awt.image.BufferedImage pImage, int pWidth, int pHeight, boolean useFastRendering)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int getIconHeight()  
      int getIconWidth()  
      void paintIcon​(java.awt.Component c, java.awt.Graphics g, int x, int y)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • image

        private final java.awt.image.BufferedImage image
      • width

        private final int width
      • height

        private final int height
      • fast

        private final boolean fast
    • Constructor Detail

      • BufferedImageIcon

        public BufferedImageIcon​(java.awt.image.BufferedImage pImage)
      • BufferedImageIcon

        public BufferedImageIcon​(java.awt.image.BufferedImage pImage,
                                 int pWidth,
                                 int pHeight)
      • BufferedImageIcon

        public BufferedImageIcon​(java.awt.image.BufferedImage pImage,
                                 int pWidth,
                                 int pHeight,
                                 boolean useFastRendering)
    • Method Detail

      • getIconHeight

        public int getIconHeight()
        Specified by:
        getIconHeight in interface javax.swing.Icon
      • getIconWidth

        public int getIconWidth()
        Specified by:
        getIconWidth in interface javax.swing.Icon
      • paintIcon

        public void paintIcon​(java.awt.Component c,
                              java.awt.Graphics g,
                              int x,
                              int y)
        Specified by:
        paintIcon in interface javax.swing.Icon