本文整理了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
暂无
代码示例来源: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("");
}
}
内容来源于网络,如有侵权,请联系作者删除!