Object source = e.getSource(); if (hostTree.getModel().equals(source)) setNameServerHostName(); experimentBuilder.setModified(true);
if (hostTree.getModel().equals(source)) { DefaultMutableTreeNode parent = (DefaultMutableTreeNode)e.getTreePath().getLastPathComponent(); if (((ConsoleTreeObject)parent.getUserObject()).isRoot()) { setNameServerHostName(); experimentBuilder.setModified(true); return; } }  if (hostTree.getModel().equals(source) || nodeTree.getModel().equals(source)) { Object[] children = e.getChildren(); if (children != null && children.length > 0) { DefaultMutableTreeNode firstChild = (DefaultMutableTreeNode)children[0]; ConsoleTreeObject changedNode = (ConsoleTreeObject)firstChild.getUserObject(); if (changedNode.isNode()) { ((ExperimentNode)changedNode.getComponent()).rename(changedNode.getName()); experimentBuilder.setModified(true); return; } } }
  public void treeNodesChanged(TreeModelEvent e) {    //    System.out.println("Tree Node Changed: " +    //                       ((ConsoleTreeObject)((DefaultMutableTreeNode)e.getTreePath().getLastPathComponent()).getUserObject()).getName());    Object source = e.getSource();    if (hostTree.getModel().equals(source))      setNameServerHostName();    experimentBuilder.setModified(true);  }