Esempio n. 1
0
 public void removeChild(TreeNavigatorNode parent, TreeNavigatorNode child) {
   int i = getIndexOfChild(parent, child);
   parent.removeChild(child);
   TreeModelEvent tme =
       new TreeModelEvent(this, parent.getTreePath(), new int[] {i}, new Object[] {child});
   for (TreeModelListener l : listeners) {
     l.treeNodesRemoved(tme);
   }
 }
Esempio n. 2
0
 public void addChild(
     TreeNavigatorNode parent, TreeNavigatorNode child, TreeNavigatorNode previousSibling) {
   // int i = parent.getChildCount();
   int p = parent.addChild(child, previousSibling);
   TreeModelEvent tme =
       new TreeModelEvent(this, parent.getTreePath(), new int[] {p}, new Object[] {child});
   for (TreeModelListener l : listeners) {
     l.treeNodesInserted(tme);
   }
 }