javax.swing.plaf.metal
Class MetalIconFactory.ImageCacher

java.lang.Object
  extended byjavax.swing.plaf.metal.MetalIconFactory.ImageCacher
Enclosing class:
MetalIconFactory

static class MetalIconFactory.ImageCacher
extends Object

Utility class for caching icon images. This is necessary because we need a new image whenever we are rendering into a new GraphicsConfiguration, but we do not want to keep recreating icon images for GC's that we have already seen (for example, dragging a window back and forth between monitors on a multimon system, or drawing an icon to different Components that have different GC's). So now whenever we create a new icon image for a given GC, we cache that image with the GC for later retrieval.


Nested Class Summary
(package private)  class MetalIconFactory.ImageCacher.ImageGcPair
           
 
Field Summary
(package private)  MetalIconFactory.ImageCacher.ImageGcPair currentImageGcPair
           
(package private)  Vector images
           
 
Constructor Summary
(package private) MetalIconFactory.ImageCacher()
           
 
Method Summary
(package private)  void cacheImage(Image image, GraphicsConfiguration gc)
           
(package private)  Image getImage(GraphicsConfiguration newGC)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

images

Vector images

currentImageGcPair

MetalIconFactory.ImageCacher.ImageGcPair currentImageGcPair
Constructor Detail

MetalIconFactory.ImageCacher

MetalIconFactory.ImageCacher()
Method Detail

getImage

Image getImage(GraphicsConfiguration newGC)

cacheImage

void cacheImage(Image image,
                GraphicsConfiguration gc)