本文整理了Java中com.vaadin.ui.Embedded.setDescription()
方法的一些代码示例,展示了Embedded.setDescription()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Embedded.setDescription()
方法的具体详情如下:
包路径:com.vaadin.ui.Embedded
类名称:Embedded
方法名:setDescription
暂无
代码示例来源:origin: apache/ace
/**
* Factory method to create an embeddable icon.
*
* @param name
* the name of the icon to use (is also used as tooltip text);
* @param res
* the resource denoting the actual icon.
* @return an embeddable icon, never <code>null</code>.
*/
protected Embedded createIcon(String name, Resource res) {
Embedded embedded = new Embedded(name, res);
embedded.setType(Embedded.TYPE_IMAGE);
embedded.setDescription(name);
embedded.setHeight(ICON_HEIGHT + "px");
embedded.setWidth(ICON_WIDTH + "px");
return embedded;
}
代码示例来源:origin: org.aperteworkflow/gui-commons
public static HorizontalLayout labelWithIcon(Resource image, String caption, String style, String description) {
Embedded img = new Embedded(null, image);
img.setDescription(description);
Label label = new Label(caption, Label.CONTENT_XHTML);
label.setDescription(description);
if (style != null) {
label.setStyleName(style);
}
HorizontalLayout hl = VaadinUtility.horizontalLayout(Alignment.MIDDLE_LEFT, img, label);
hl.setWidth(-1, Sizeable.UNITS_PIXELS);
return hl;
}
内容来源于网络,如有侵权,请联系作者删除!