use of com.storedobject.common.HTMLText in project SODevelopment by syampillai.
the class ELabel method convert.
private static Object convert(Object object) {
if (object == null) {
return "";
}
if (object instanceof Icon) {
HTMLText h = new HTMLText();
h.appendHTML("<iron-icon icon=\"" + ((Icon) object).getElement().getAttribute("icon") + "\"></iron-icon>");
return h;
}
if (object instanceof ELabel) {
return ((ELabel) object).label;
}
Application a = Application.get();
if (a != null) {
return a.getEnvironment().toDisplay(object);
}
return object;
}