本文整理了Java中com.vaadin.flow.dom.Element.indexOfChild()
方法的一些代码示例,展示了Element.indexOfChild()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Element.indexOfChild()
方法的具体详情如下:
包路径:com.vaadin.flow.dom.Element
类名称:Element
方法名:indexOfChild
暂无
代码示例来源:origin: appreciated/vaadin-app-layout
public void setSelected(PaperTab tab) {
final int indexOfTab = getElement().indexOfChild(tab.getElement());
long index = getChildren()
.filter(component -> getElement().indexOfChild(component.getElement()) < indexOfTab)
.filter(component -> component instanceof PaperTab)
.count();
setSelected((int) index);
}
代码示例来源:origin: com.vaadin/vaadin-accordion-flow
/**
* Opens the specified panel.
*
* @param panel the non-null panel to be opened
*/
public void open(AccordionPanel panel) {
Objects.requireNonNull(panel, "The panel to be opened cannot be null");
open(getElement().indexOfChild(panel.getElement()));
}
代码示例来源:origin: com.vaadin/vaadin-button-flow
int iconIndex = getElement().indexOfChild(iconComponent.getElement());
int textIndex;
textIndex = getElement().indexOfChild(span);
} else if (iconAfterText) {
textIndex = getElement()
.indexOfChild(textNodes[textNodes.length - 1]);
} else {
textIndex = getElement().indexOfChild(textNodes[0]);
代码示例来源:origin: com.vaadin/flow-server
} else {
Element element = getElement();
int oldIndex = element.indexOfChild(oldComponent.getElement());
int newIndex = element.indexOfChild(newComponent.getElement());
if (oldIndex >= 0 && newIndex >= 0) {
element.insertChild(oldIndex, newComponent.getElement());
内容来源于网络,如有侵权,请联系作者删除!