net.refractions.udig.ui
Class OverlayCache

java.lang.Object
  extended by net.refractions.udig.ui.OverlayCache

public class OverlayCache
extends java.lang.Object

The OverlayCache is works specifically with DecoratorOverlayIcon allowing decorators while not wasting resources.

Note this class is limited to working with DecoratorOveralayIcon since it has a working equals and hashcode implemenation.


Constructor Summary
OverlayCache()
           
 
Method Summary
 Image applyDescriptors(Image source, ImageDescriptor[] descriptors)
          Apply the descriptors for the receiver to the supplied image.
 Image applyStatus(Image source, ImageDescriptor status)
           
 void disposeAll()
          Disposes of all images in the cache.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OverlayCache

public OverlayCache()
Method Detail

disposeAll

public void disposeAll()
Disposes of all images in the cache.


applyDescriptors

public Image applyDescriptors(Image source,
                              ImageDescriptor[] descriptors)
Apply the descriptors for the receiver to the supplied image.

*

Example use:


 applyDescriptors( base,
                   new ImageDescriptor[][]={
                       null,     // TOP_LEFT     unsure if we will use this
                       modified, // TOP_RIGHT    indicate content modified (w/ *) 
                       status,   // BOTTOM_LEFT  called the auxiliary overlay warn, error, success
                       cached,   // BOTTOM_RIGHT not yet defined, recommened cache status...  
                       null,     // UNDERLAY     not sure if we will use this
                   }
 );
 

Parameters:
source -
descriptors -
Returns:
Image

applyStatus

public Image applyStatus(Image source,
                         ImageDescriptor status)