/** * Inform listeners that a node has been added */ @Override public void fireNodeAdded(ITreeNode parent, ITreeNode child, int index) { // if(child.toString().indexOf("A:")!=-1) // System.out.println("here4"); assert SwingUtilities.isEventDispatchThread();// || Starter.isShutdown(); super.fireNodeAdded(parent, child, index); }
rems.remove(node); model.addNode(node); model.fireNodeAdded(AbstractTreeNode.this, node, i); changed = true;
/** * Add a child and update the tree. Must be called from swing thread. */ public void addChild(int index, ITreeNode node) { // Ignore when node already removed. if(!model.isZombieNode(node.getId())) { // set parent to this ((AbstractTreeNode)node).setParent(this); if(children == null) children = new ArrayList(); children.add(index, node); model.addNode(node); model.fireNodeAdded(this, node, index); if (searching) dirty = true; // if(node.getId().toString().startsWith("ANDTest@")) // System.out.println("Node added: "+node+", "+children); } else { model.removeZombieNode(node); } }
children.add(index, node); model.addNode(node); model.fireNodeAdded(this, node, index); if (searching) dirty = true;