if (icon != null) {
result = icon.createBackgroundFigure();
} else {
// If there is no icon, then maybe there is an
// _iconDescription attribute.
SingletonConfigurableAttribute description = (SingletonConfigurableAttribute) entity
.getAttribute("_iconDescription",
SingletonConfigurableAttribute.class);
if (description != null) {
// Look for an icon description in my container.
SingletonConfigurableAttribute myDescription = (SingletonConfigurableAttribute) myContainer
.getAttribute(
"_iconDescription",
SingletonConfigurableAttribute.class);
if (myDescription != null) {
// Save my original description, in case I go
// back to having nothing inside.
if (_originalDescription == null) {
_originalDescription = myDescription
.getConfigureText();
}
myDescription.configure(null, null, description
.getConfigureText());
}
}
}
} else {
// Restore the original description if we don't have
// one now.
if ((result == null) && (_originalDescription != null)) {
// Restore the original icon description.
// Look for an icon description in my container.
SingletonConfigurableAttribute myDescription = (SingletonConfigurableAttribute) myContainer
.getAttribute("_iconDescription",
SingletonConfigurableAttribute.class);
if (myDescription != null) {
myDescription.configure(null, null,
_originalDescription);
}
}
}
} catch (Throwable throwable) {