public static class TreeDemoIconValues.LazyLoadingIconValue extends Object implements IconValue
IconValue.IconType
Modifier and Type | Field and Description |
---|---|
private Class<?> |
baseClass |
private Icon |
fallbackIcon |
private Map<Object,Icon> |
iconCache |
private StringValue |
keyToFileName |
Constructor and Description |
---|
LazyLoadingIconValue(Class<?> baseClass,
StringValue sv,
String fallbackName) |
Modifier and Type | Method and Description |
---|---|
Icon |
getIcon(Object value)
Returns a icon representation of the given value.
|
protected Icon |
loadFromResource(String name) |
private Icon |
loadIcon(String key) |
private StringValue keyToFileName
private Icon fallbackIcon
public LazyLoadingIconValue(Class<?> baseClass, StringValue sv, String fallbackName)
public Icon getIcon(Object value)
Implemented to return a Icon appropriate for the given node value. The icon is loaded (and later cached) as a resource, using a lookup key created by a StringValue.
protected Icon loadFromResource(String name)
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses