use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project ovirt-engine by oVirt.
the class TemplateBreadCrumbsView method getName.
@Override
public SafeHtml getName(VmTemplate item) {
SafeHtmlBuilder builder = new SafeHtmlBuilder();
builder.append(super.getName(item));
if (!item.getId().equals(item.getBaseTemplateId())) {
if (item.getTemplateVersionName() != null) {
// $NON-NLS-1$
builder.appendEscaped("/");
builder.appendEscaped(item.getTemplateVersionName());
}
// $NON-NLS-1$
builder.appendEscaped(" (");
builder.append(item.getTemplateVersionNumber());
// $NON-NLS-1$
builder.appendEscaped(")");
}
return builder.toSafeHtml();
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project ovirt-engine by oVirt.
the class IconEditorWidget method toList.
private SafeHtml toList(List<String> stringItems) {
SafeHtmlBuilder builder = new SafeHtmlBuilder();
builder.appendEscaped(stringItems.get(0));
return builder.toSafeHtml();
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project ovirt-engine by oVirt.
the class VmHighPerformanceConfigurationWidget method edit.
@Override
public void edit(VmHighPerformanceConfigurationModel object) {
driver.edit(object);
if (object.getRecommendationsList().size() > 0) {
setVisibilityToRecommendationsListExpander(true);
SafeHtmlBuilder recommendationsListBuilder = new SafeHtmlBuilder();
for (String field : object.getRecommendationsList()) {
// $NON-NLS-1$ //$NON-NLS-2$
String escapedField = SafeHtmlUtils.htmlEscape(field).replaceAll("\n", "<br>");
recommendationsListBuilder.append(bulletedItem(escapedField));
}
recommendationsList.setHTML(recommendationsListBuilder.toSafeHtml());
}
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project ovirt-engine by oVirt.
the class HostNetworkInterfaceListViewItem method createLabelTooltipText.
private SafeHtml createLabelTooltipText(Set<String> labels) {
SafeHtmlBuilder builder = new SafeHtmlBuilder();
// $NON-NLS-1$
builder.appendHtmlConstant(labels.stream().sorted().collect(Collectors.joining("<BR />")));
return builder.toSafeHtml();
}
use of com.google.gwt.safehtml.shared.SafeHtmlBuilder in project closure-compiler by google.
the class DebuggerGwtMain method createCheckboxes.
private void createCheckboxes(CellPanel checkboxPanel) {
for (CompilationParam.ParamGroup group : CompilationParam.ParamGroup.values()) {
SafeHtmlBuilder builder = new SafeHtmlBuilder();
builder.appendHtmlConstant("<b>");
builder.appendEscaped(group.name);
builder.appendHtmlConstant("</b>");
checkboxPanel.add(new HTML(builder.toSafeHtml()));
for (final CompilationParam param : CompilationParam.getGroupedSortedValues().get(group)) {
CheckBox cb = new CheckBox(param.toString());
if (param.getJavaInfo() != null) {
cb.setTitle("Java API equivalent: " + param.getJavaInfo());
}
cb.setValue(param.getDefaultValue());
param.apply(options, param.getDefaultValue());
cb.addClickHandler(new ClickHandler() {
@Override
public void onClick(ClickEvent event) {
boolean checked = ((CheckBox) event.getSource()).getValue();
param.apply(options, checked);
doCompile();
}
});
checkboxPanel.add(cb);
}
}
}
Aggregations