private static Map<String, Image> imageMap = new HashMap<String, Image>();
+ private static Map<String, URL> urlMap = new HashMap<String, URL>();
+
private static final ArrayList<Image> iconList;
static
defaultProps.put("logo.512", "/default_images/jalview_logo-512.png");
defaultProps.put("rotatable_logo.48",
"/default_images/rotatable_jalview_logo-38.png");
- defaultProps.put("bg_logo.62", "/default_images/barton_group-62.png");
- defaultProps.put("uod_banner", "/default_images/UoD_banner.png");
+ defaultProps.put("bg_logo.28", "/default_images/barton_group-28.png");
+ defaultProps.put("bg_logo.30", "/default_images/barton_group-30.png");
+ defaultProps.put("bg_logo.32", "/default_images/barton_group-32.png");
+ defaultProps.put("uod_banner.28", "/default_images/UoD_banner-28.png");
+ defaultProps.put("uod_banner.30", "/default_images/UoD_banner-30.png");
+ defaultProps.put("uod_banner.32", "/default_images/UoD_banner-32.png");
defaultProps.put("default_appbase",
"https://www.jalview.org/getdown/release/1.8");
return imageMap;
}
+ private static Map<String, URL> urlMap()
+ {
+ return urlMap;
+ }
+
/*
* getProperty(key) will get property value from channel_properties for key.
* If no property for key is found, it will fall back to using the defaultProps defined for this class.
else
{
imageMap().put(key, img);
+ urlMap.put(key, imageURL);
}
}
return img;
}
/*
+ * Public method to get the URL object pointing to a cached image.
+ */
+ public static URL getImageURL(String key)
+ {
+ if (getImage(key) != null)
+ {
+ if (urlMap().containsKey(key))
+ {
+ return urlMap().getOrDefault(key, null);
+ }
+ System.err.println(
+ "Do not use getImageURL(key) before using getImage(key...)");
+ }
+ return null;
+ }
+
+ /*
* Get a List of Icon images of different sizes.
*/
public static ArrayList<Image> getIconList()