/** Inserts the given child node into the given parent at the given index. */ public void insertNodeInto(MutableTreeNode child, MutableTreeNode parent, int idx) { parent.insert(child, idx); fireTreeNodesInserted(this, getPathToRoot(parent), new int[] {idx}, new Object[] {child}); }
private static void addChildrenTo(final MutableTreeNode node, final List<TreeNode> children) { for (final Object aChildren : children) { final MutableTreeNode child = (MutableTreeNode) aChildren; node.insert(child, node.getChildCount()); } }