com.vaadin.ui.Embedded.setDescription()方法的使用及代码示例

x33g5p2x  于2022-01-19 转载在 其他  
字(1.3k)|赞(0)|评价(0)|浏览(110)

本文整理了Java中com.vaadin.ui.Embedded.setDescription()方法的一些代码示例,展示了Embedded.setDescription()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Embedded.setDescription()方法的具体详情如下:
包路径:com.vaadin.ui.Embedded
类名称:Embedded
方法名:setDescription

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;
}

相关文章