|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.inet.html.image.ImageCache
public class ImageCache
JWebEngine Image Cache. Caches the images by soft references, generates id's for images without URL.
Constructor Summary | |
---|---|
ImageCache()
|
Method Summary | |
---|---|
void |
addImage(java.lang.String identifier,
java.net.URL base,
java.awt.Image content)
Adds a certain image to the cache |
RemoteImage |
getImage(java.lang.String identifier,
java.net.URL base,
java.awt.image.ImageObserver observer)
Loads a certain image or returns it's cached instance |
static ImageCache |
getStaticInstance()
Returns the static cache. |
boolean |
isCacheReference(java.lang.String identifier)
Returns true, if the identifier is a cache ID. |
java.lang.String |
registerImage(java.awt.Image content)
Stores an image content to the cache an generates an ID for this content |
boolean |
removeKey(java.lang.String identifier,
java.net.URL base)
Removes a cache entry, if known |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ImageCache()
Method Detail |
---|
public static ImageCache getStaticInstance()
public RemoteImage getImage(java.lang.String identifier, java.net.URL base, java.awt.image.ImageObserver observer)
identifier
- the identifier (may be a cache ID, a relative or absolute URL)base
- the base URL of the current document, required to resolve relative URLsobserver
- the observer to notify of the load progress
public void addImage(java.lang.String identifier, java.net.URL base, java.awt.Image content)
identifier
- the identifier (may be a cache ID, a relative or absolute URL)base
- the base URL of the current document, required to resolve relative URLscontent
- the image content to add to the cachepublic boolean removeKey(java.lang.String identifier, java.net.URL base)
identifier
- the identifier or an absolute or relative URLbase
- the base URL for relative URL identifiers
public java.lang.String registerImage(java.awt.Image content)
content
- the content to store
public boolean isCacheReference(java.lang.String identifier)
identifier
- the identifier to be checked, may be null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |