/** Initialize the synthProperties Hashtable if needed. */
private synchronized void createSynthProperties() {
if (synthProperties == null) {
synthProperties = new Hashtable();
synthProperties.put(new CaselessStringKey("image_width"),
new Integer(theImage.getWidth()));
synthProperties.put(new CaselessStringKey("image_height"),
new Integer(theImage.getHeight()));
synthProperties.put(new CaselessStringKey("image_min_x_coord"),
new Integer(theImage.getMinX()));
synthProperties.put(new CaselessStringKey("image_min_y_coord"),
new Integer(theImage.getMinY()));
if(theImage instanceof OpImage) {
synthProperties.put(new CaselessStringKey("tile_cache_key"),
theImage);
Object tileCache = ((OpImage)theImage).getTileCache();
synthProperties.put(new CaselessStringKey("tile_cache"),
tileCache == null ?
java.awt.Image.UndefinedProperty :
tileCache);
} else if(theImage instanceof PlanarImageServerProxy) {
synthProperties.put(new CaselessStringKey("tile_cache_key"),
theImage);
Object tileCache =
((PlanarImageServerProxy)theImage).getTileCache();
synthProperties.put(new CaselessStringKey("tile_cache"),
tileCache == null ?
java.awt.Image.UndefinedProperty :
tileCache);
} else {
Object tileCacheKey = theImage.getProperty("tile_cache_key");
synthProperties.put(new CaselessStringKey("tile_cache_key"),
tileCacheKey == null ?
java.awt.Image.UndefinedProperty :
tileCacheKey);
Object tileCache = theImage.getProperty("tile_cache");
synthProperties.put(new CaselessStringKey("tile_cache"),
tileCache == null ?
java.awt.Image.UndefinedProperty :
tileCache);
}
}