本文整理汇总了Java中com.google.gwt.safehtml.shared.SafeHtmlUtils.EMPTY_SAFE_HTML属性的典型用法代码示例。如果您正苦于以下问题:Java SafeHtmlUtils.EMPTY_SAFE_HTML属性的具体用法?Java SafeHtmlUtils.EMPTY_SAFE_HTML怎么用?Java SafeHtmlUtils.EMPTY_SAFE_HTML使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类com.google.gwt.safehtml.shared.SafeHtmlUtils
的用法示例。
在下文中一共展示了SafeHtmlUtils.EMPTY_SAFE_HTML属性的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: onLoad
@Override
public void onLoad (PreloadedImage image) {
image.addStyleName("img-rounded");
image.addStyleName("col-xs-" + (int) (12 / IMAGES_PER_ROW));
if ((resources.size() - 1) % IMAGES_PER_ROW == 0) {
currentResourceRow = new HTMLPanel(
SafeHtmlUtils.EMPTY_SAFE_HTML);
currentResourceRow.addStyleName("row");
pnlImagePreviews.add(currentResourceRow);
}
currentResourceRow.add(image);
}
示例2: render
@Override
public void render (Context context, Post value, SafeHtmlBuilder builder) {
SafeUri link = PageTypeHelper.asHref(PageType.PostDetailPageType,
PostHelper.getSlug(value));
SafeHtml published = Templates.INSTANCE.notPublished(DateTimeHelper
.ago(value.created));
if (value.published != null) {
published = Templates.INSTANCE.publishedDate(DateTimeHelper
.ago(value.published));
}
String body = "Empty... :imp:";
if (value.summary != null && value.summary.length() > 0) {
body = value.summary;
} else if (value.content != null && value.content.body != null
&& value.content.body.length() > 0) {
body = value.content.body;
}
SafeHtml author = SafeHtmlUtils.EMPTY_SAFE_HTML;
if (PropertyController.get().booleanProperty(
PropertyHelper.POST_SHOW_AUTHOR, false)) {
author = Templates.INSTANCE
.author(UriUtils.fromString(value.author.avatar + "?s="
+ UserHelper.AVATAR_HEADER_SIZE + "&default=retro"),
UserHelper.handle(value.author));
}
RENDERER.render(builder, link, SafeHtmlUtils
.fromTrustedString(PostHelper.makeHeading2(value.title)),
SafeHtmlUtils.fromTrustedString(PostHelper.makeMarkup(body)),
author, published,
value.listed.booleanValue() ? SafeHtmlUtils.EMPTY_SAFE_HTML
: Templates.INSTANCE.notVisible());
}
示例3: html
@Column(header = "SafeHtml", cellType = CustomSafeHtmlCell.class)
public SafeHtml html()
{
return SafeHtmlUtils.EMPTY_SAFE_HTML;
}