List of usage examples for com.google.gwt.safecss.shared SafeStylesUtils forHeight
public static SafeStyles forHeight(double value, Unit unit)
From source file:stroom.cell.info.client.SvgCell.java
License:Apache License
@Override public void render(final Context context, final SvgPreset value, final SafeHtmlBuilder sb) { if (value == null) { sb.append(SafeHtmlUtils.EMPTY_SAFE_HTML); } else {/*from w w w . ja va2s. co m*/ final SafeStylesBuilder builder = new SafeStylesBuilder(); builder.append(SafeStylesUtils.forWidth(value.getWidth(), Unit.PX)); builder.append(SafeStylesUtils.forHeight(value.getHeight(), Unit.PX)); String className = resources.style().icon(); if (!value.isEnabled()) { className += " " + resources.style().disabled(); } sb.append(template.icon(className, builder.toSafeStyles(), UriUtils.fromString(value.getUrl()))); } }