List of usage examples for com.google.gwt.safecss.shared SafeStylesUtils forTrustedColor
public static SafeStyles forTrustedColor(String value)
Returns a SafeStyles constructed from a trusted font color, i.e., without escaping the value.
From source file:org.zoxweb.client.widget.WidgetUtil.java
License:Apache License
/** * //from w w w .j a v a2s . c o m * @param color * @param text * @return SafeHtml */ public static SafeHtml renderText(String color, String text) { SafeHtml safeValue = SafeHtmlUtils.fromString(color); // Use the template to create the Cell's html. SafeStyles styles = SafeStylesUtils.forTrustedColor(safeValue.asString()); return STYLE_TEMPLATES.cell(styles, SafeHtmlUtils.fromString(text)); }
From source file:stroom.cell.info.client.FACell.java
License:Apache License
@Override public void render(final Context context, final GlyphIcon value, final SafeHtmlBuilder sb) { if (value == null) { sb.append(SafeHtmlUtils.EMPTY_SAFE_HTML); } else {// ww w .j a v a 2 s. c om sb.append(template.icon(resources.style().icon(), resources.style().face(), SafeStylesUtils.forTrustedColor(value.getColourSet().getEnabled()), value.getGlyph())); } }