use of com.vaadin.flow.internal.nodefeature.ElementChildrenList in project flow by vaadin.
the class StateNodeTest method setParent.
public static void setParent(StateNode child, StateNode parent) {
if (parent == null) {
// Remove child
parent = child.getParent();
ElementChildrenList children = parent.getFeature(ElementChildrenList.class);
children.remove(children.indexOf(child));
} else {
// Add child
assert child.getParent() == null;
ElementChildrenList children = parent.getFeature(ElementChildrenList.class);
children.add(children.size(), child);
}
}
use of com.vaadin.flow.internal.nodefeature.ElementChildrenList in project flow by vaadin.
the class StateNodeTest method addChild.
private void addChild(StateNode parent, StateNode node) {
removeFromParent(node);
ElementChildrenList list = parent.getFeature(ElementChildrenList.class);
list.add(list.size(), node);
}
Aggregations