org.jboss.errai.common.client.dom.Span.appendChild()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(178)

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

Span.appendChild介绍

暂无

代码示例

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

@Test
  public void testMessages() {
    final HTMLElement htmlElement = mock(HTMLElement.class);
    when(htmlElement.getClassList()).thenReturn(mock(DOMTokenList.class));
    when(document.createElement(anyString())).thenReturn(htmlElement);
    when(message.getChildNodes()).thenReturn(mock(NodeList.class));

    notification.setMessage(Arrays.asList("message"));

    verify(message).appendChild(any(Node.class));
    verify(document).createElement("li");
    verify(document).createElement("ul");
  }
}

代码示例来源:origin: kiegroup/appformer

@Test
  public void testMessages() {
    final HTMLElement htmlElement = mock(HTMLElement.class);
    when(htmlElement.getClassList()).thenReturn(mock(DOMTokenList.class));
    when(document.createElement(anyString())).thenReturn(htmlElement);
    when(message.getChildNodes()).thenReturn(mock(NodeList.class));

    notification.setMessage(Arrays.asList("message"));

    verify(message).appendChild(any(Node.class));
    verify(document).createElement("li");
    verify(document).createElement("ul");
  }
}

代码示例来源:origin: org.uberfire/uberfire-workbench-client-views-patternfly

public void setMessage(final List<String> messages) {
  removeAllElementChildren(this.message);
  final HTMLElement ul = document.createElement("ul");
  addCSSClass(ul,
        "list-unstyled");
  for (String message : messages) {
    final HTMLElement li = document.createElement("li");
    li.setTextContent(message);
    ul.appendChild(li);
  }
  this.message.appendChild(ul);
}

代码示例来源:origin: kiegroup/appformer

public void setMessage(final List<String> messages) {
  removeAllElementChildren(this.message);
  final HTMLElement ul = document.createElement("ul");
  addCSSClass(ul,
        "list-unstyled");
  for (String message : messages) {
    final HTMLElement li = document.createElement("li");
    li.setTextContent(message);
    ul.appendChild(li);
  }
  this.message.appendChild(ul);
}

代码示例来源:origin: kiegroup/jbpm-wb

addCSSClass(spanIcon,
      "fa-calendar");
spanGroup.appendChild(spanIcon);

代码示例来源:origin: org.kie.workbench.stunner/kie-wb-common-stunner-widgets

@Override
public void render(final Glyph glyph,
          final double width,
          final double height) {
  final org.jboss.errai.common.client.api.IsElement glyphElement =
      domGlyphRenderers.render(glyph,
                   width,
                   height);
  icon.appendChild(glyphElement.getElement());
  final String title = presenter.getItem().getTitle();
  if (!StringUtils.isEmpty(title)) {
    name.setTextContent(presenter.getItem().getTitle());
  } else {
    name.getStyle().setProperty(DISPLAY, DISPLAY_NONE);
    icon.getStyle().setProperty(PADDING_RIGHT, "0");
  }
  final String tooltip = presenter.getItem().getTooltip();
  if (!StringUtils.isEmpty(tooltip)) {
    itemAnchor.setTitle(tooltip);
  } else {
    itemAnchor.setTitle("");
  }
}

相关文章