本文整理汇总了Java中com.vaadin.server.FontIcon.getHtml方法的典型用法代码示例。如果您正苦于以下问题:Java FontIcon.getHtml方法的具体用法?Java FontIcon.getHtml怎么用?Java FontIcon.getHtml使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.vaadin.server.FontIcon
的用法示例。
在下文中一共展示了FontIcon.getHtml方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ToolbarButton
import com.vaadin.server.FontIcon; //导入方法依赖的package包/类
private ToolbarButton(ToolbarButtonBuilder builder) {
FontIcon icon = builder.icon;
if (icon != null) {
contentFA = icon.getHtml();
if (builder.iconText != null) {
contentFA += builder.iconText;
}
}
contentDefault = builder.iconFallback;
if (builder.customTranslation) {
aria = builder.aria;
} else {
// get buildin translations
aria = builder.toolbarBuilder.getOptionsBuilder().getTranslation(builder.aria);
}
name = builder.name;
action = builder.action;
if (action == null) {
action = name;
}
tagNames = builder.tagNames;
style = builder.style;
useQueryState = builder.useQueryState;
classList = builder.classList;
attrs = builder.attrs;
}
示例2: convertToPresentation
import com.vaadin.server.FontIcon; //导入方法依赖的package包/类
@Override
public String convertToPresentation(FontIcon value, Class<? extends String> targetType, Locale locale)
throws com.vaadin.data.util.converter.Converter.ConversionException {
if (value != null) {
return value.getHtml();
}
return null;
}
示例3: convertToPresentation
import com.vaadin.server.FontIcon; //导入方法依赖的package包/类
@Override
public String convertToPresentation(FontIcon value, ValueContext context) {
if (value != null) {
return value.getHtml();
}
return null;
}
示例4: convertToPresentation
import com.vaadin.server.FontIcon; //导入方法依赖的package包/类
@Override
public String convertToPresentation(FontIcon value, ValueContext context) {
if (value == null) {
return null;
}
return value.getHtml();
}
示例5: withCaptionAndIcon
import com.vaadin.server.FontIcon; //导入方法依赖的package包/类
public MetaFieldBuilder withCaptionAndIcon(FontIcon icon, String caption) {
captionHtml = icon.getHtml() + " " + StringUtils.trim(caption, 20, true);
return this;
}