Help - Added a task to find unused help images; fixed showing in-memory

images in help
This commit is contained in:
dragonmacher 2019-04-24 17:48:44 -04:00
parent e8dcb3d0c4
commit 49436c44a9
12 changed files with 275 additions and 131 deletions

View file

@ -400,14 +400,18 @@ public class ResourceManager {
}
/**
* Get the name of this icon. If icon is an ImageIcon, its getDescription() is called to
* get the name
* Get the name of this icon. The value is usually going to be the URL from which the icon
* was loaded
*
* @param icon the icon for which the name is desired
* @return the name
* @return the name
*/
public static String getIconName(Icon icon) {
String iconName = icon.toString();
if (icon instanceof FileBasedIcon) {
return ((FileBasedIcon) icon).getFilename();
}
if (icon instanceof ImageIcon) {
iconName = ((ImageIcon) icon).getDescription();
}