org.openide.util
Class IconManager

java.lang.Object
  extended by org.openide.util.IconManager

final class IconManager
extends java.lang.Object

Registers all loaded images into the AbstractNode, so nothing is loaded twice.

Author:
Jaroslav Tulach

Constructor Summary
IconManager()
           
 
Method Summary
(package private) static java.awt.image.BufferedImage createBufferedImage(int width, int height)
          Creates BufferedImage with Transparency.TRANSLUCENT
(package private) static java.awt.Image getIcon(java.lang.String resource, boolean localized)
           
(package private) static java.lang.ClassLoader getLoader()
          Get the class loader from lookup.
(package private) static java.awt.Image mergeImages(java.awt.Image im1, java.awt.Image im2, int x, int y)
          Method that attempts to find the merged image in the cache first, then creates the image if it was not found.
(package private) static java.awt.Image toBufferedImage(java.awt.Image img)
          The method creates a BufferedImage which represents the same Image as the parameter but consumes less memory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IconManager

IconManager()
Method Detail

getLoader

static java.lang.ClassLoader getLoader()
Get the class loader from lookup. Since this is done very frequently, it is wasteful to query lookup each time. Instead, remember the last result and just listen for changes.


getIcon

static java.awt.Image getIcon(java.lang.String resource,
                              boolean localized)

mergeImages

static final java.awt.Image mergeImages(java.awt.Image im1,
                                        java.awt.Image im2,
                                        int x,
                                        int y)
Method that attempts to find the merged image in the cache first, then creates the image if it was not found.


toBufferedImage

static final java.awt.Image toBufferedImage(java.awt.Image img)
The method creates a BufferedImage which represents the same Image as the parameter but consumes less memory.


createBufferedImage

static final java.awt.image.BufferedImage createBufferedImage(int width,
                                                              int height)
Creates BufferedImage with Transparency.TRANSLUCENT