@Override public void render(com.google.gwt.cell.client.Cell.Context context, TreePlace value, SafeHtmlBuilder sb) { if (value != null) { sb.appendEscaped(value.getName()); } } }
@Override public void render(Context context, T value, SafeHtmlBuilder sb) { sb.appendEscaped(renderer.render(value)); } }
wordBounds.endIndex); cursor = wordBounds.endIndex; accum.appendEscaped(part1); accum.appendHtmlConstant("<strong>"); accum.appendEscaped(part2); accum.appendHtmlConstant("</strong>"); accum.appendEscaped(formattedSuggestion.substring(cursor)); MultiWordSuggestion suggestion = createSuggestion(formattedSuggestion, accum.toSafeHtml().asString());
classes.appendEscaped(style.buttonCellBase()); Decoration decoration = cell.getDecoration(); if (decoration == Decoration.PRIMARY) { classes.appendEscaped(" " + style.buttonCellBasePrimary()); } else if (decoration == Decoration.NEGATIVE) { classes.appendEscaped(" " + style.buttonCellBaseNegative()); } else { classes.appendEscaped(" " + style.buttonCellBaseDefault()); classes.appendEscaped(" " + style.buttonCellBaseCollapseLeft()); classes.appendEscaped(" " + style.buttonCellBaseCollapseRight());
@Override public void render(final com.google.gwt.cell.client.Cell.Context context, final List<M> value, final SafeHtmlBuilder sb) { sb.appendEscaped(value == null || value.isEmpty() ? CrudRs.TXT.none() : Joiner.on(SEPARATOR).join(Lists.transform(value, new Function<M, String>() { @Override public String apply(final M input) { return input == null ? Uis.NOTHING : input.getName(); } }))); } }
@Override public void render(Context context, ResourceType value, SafeHtmlBuilder sb) { if(value != null) { sb.appendEscaped(value.getName() + " (" + value.getResourceList().size() + ")"); } } }
private SafeHtml getSafeHtml( final String message ) { final SafeHtmlBuilder shb = new SafeHtmlBuilder(); shb.appendEscaped( message ); return shb.toSafeHtml(); }
@Override public void render(Context context, PackageFragment value, SafeHtmlBuilder sb) { sb.appendHtmlConstant(resources.packageItem().getSvg().getElement().getString()) .appendEscaped(" "); if (value.getName().isEmpty()) { sb.appendEscaped("(default package)"); } else { sb.appendEscaped(value.getName()); } } },
private void renderEscaped(String iri, StringBuilder sb) { SafeHtmlBuilder htmlBuilder = new SafeHtmlBuilder(); htmlBuilder.appendEscaped(iri); sb.append(htmlBuilder.toSafeHtml().asString()); }
@Deprecated public static void alert(String title, String message) { alert(title, new SafeHtmlBuilder().appendEscaped(message).toSafeHtml()); }
private void renderEscapedIRI(IRI iri, StringBuilder sb) { SafeHtmlBuilder htmlBuilder = new SafeHtmlBuilder(); htmlBuilder.appendEscaped(iri.toString()); sb.append(htmlBuilder.toSafeHtml().asString()); }
@Override public IsWidget getNodePanelTitle(VM vm, List<VNodeModel> list) { VmTitlePanel titlePanel = vmTitlePanelProvider.get(); SafeHtmlBuilder builder = new SafeHtmlBuilder(); builder.appendEscaped(vm.getName()); titlePanel .initWidget(builder.toSafeHtml(), list.size(), vm.getStatus()); return titlePanel; }
@Override public void setText( String text ) { this.html.setHTML( new SafeHtmlBuilder().appendEscaped( text ).toSafeHtml() ); } }
private ImageListEditor<ColumnType>.Entry buildEntry(final ColumnType type) { final String name = type.name(); final String descr = getColumnTypeDescription(type); final SafeUri uri = getImageUri(type); return columnType.newEntry(type, uri, new SafeHtmlBuilder().appendEscaped(name).toSafeHtml(), new SafeHtmlBuilder().appendEscaped(descr).toSafeHtml()); }
@Override public void render(Context context, SnapshotModel snapshotModel, SafeHtmlBuilder sb) { if (!snapshotModel.getEntity().isVmConfigurationBroken()) { super.render(context, snapshotModel, sb); } else { sb.appendEscaped(constants.notAvailableLabel()); } } };
private void appendHighlighted(SafeHtmlBuilder builder, String text) { builder.appendHtmlConstant( "<span class=\"" + resources.coreCss().foundPhraseHighlight() + "\">"); builder.appendEscaped(text); builder.appendHtmlConstant("</span>"); }
@Override public void renderTo(FieldValue fieldValue, SafeHtmlBuilder html) { FortnightValue fortnight = (FortnightValue) fieldValue; html.appendEscaped(I18N.MESSAGES.fortnight( fortnight.getYear(), fortnight.getWeekInYear(), fortnight.getWeekInYear() + 1)); } }
@Override public SafeHtml getValue(RuntimeInfo record) { String value = valueOrDefault(record.getUrl()); SafeHtmlBuilder sb = new SafeHtmlBuilder(); sb.appendHtmlConstant("<a target=\"_blank\" href=\"" + value + "\">"); sb.appendEscaped(value); sb.appendHtmlConstant("</a>"); return sb.toSafeHtml(); } };
protected void showError(final ClientRuntimeError error) { loadingBox.hide(); final String message = error.getCause() != null ? error.getCause() : error.getMessage(); view.showErrorNotification(new SafeHtmlBuilder().appendEscaped(message).toSafeHtml()); errorEvent.fire(new ErrorEvent(this, error)); if (afterPreviewCommand != null) { this.afterPreviewCommand.execute(); } }
@Override public void render(Context context, FormulaElement formulaElement, SafeHtmlBuilder builder) { if(formulaElement.hasCode()) { builder.append(TEMPLATES.cellWithCode(FormulaResources.INSTANCE.styles().fieldTreeCode(), formulaElement.getCode(), formulaElement.getLabel())); } else { builder.appendEscaped(formulaElement.getLabel()); } } }