Package javax.swing.tree

Examples of javax.swing.tree.DefaultMutableTreeNode.removeAllChildren()


                   
                    for (int k = 0; k < cn.getChildCount(); k++) {
                        cn2 = (DefaultMutableTreeNode) cn.getChildAt(k);
                        if (cn2.getUserObject() != null)
                            ((NodeElement) cn2.getUserObject()).clear();
                        cn2.removeAllChildren();
                    }
                    cn.removeAllChildren();
                }
                pn.removeAllChildren();
            }
View Full Code Here


                {
                  // Content placeholder?
                  if(((DefaultMutableTreeNode)node.getFirstChild()).getUserObject() == null)
                  {
                    // Remove the content placeholder!
                    node.removeAllChildren();

                    // Create the page content nodes!
                    createContentNodes(
                      ((PageNodeValue)nodeValue).getPage().getContents(),
                      node
View Full Code Here

      DefaultMutableTreeNode parent = (DefaultMutableTreeNode) nodes[0].getParent();

      if (parent != null)
      {
         parent.removeAllChildren();
         startExpandingTree((ObjectTreeNode) parent, false, selectedPathNames, true);
      }
      else
      {
         nodes[0].removeAllChildren();
View Full Code Here

        while (treeModel.getChildCount(rootNode) > 0) {
            DefaultMutableTreeNode child =
                (DefaultMutableTreeNode) treeModel.getChild(rootNode, 0);

            treeModel.removeNodeFromParent(child);
            child.removeAllChildren();
            child.removeFromParent();
        }

        treeModel.nodeStructureChanged(rootNode);
        treeModel.reload();
View Full Code Here

        removeNodeFromParent(selectedDmtn);
      }
    } else if (o.length==4) {
      removeNodeFromParent(selectedDmtn);
    } else if (o.length==3) {
      selectedDmtn.removeAllChildren();
      reloadTree(selRow);
    } else if (o.length==2) {
      Enumeration enu_1=selectedDmtn.children();
      while (enu_1.hasMoreElements()) {
        DefaultMutableTreeNode dmtn_child=(DefaultMutableTreeNode) enu_1.nextElement();
View Full Code Here

      reloadTree(selRow);
    } else if (o.length==2) {
      Enumeration enu_1=selectedDmtn.children();
      while (enu_1.hasMoreElements()) {
        DefaultMutableTreeNode dmtn_child=(DefaultMutableTreeNode) enu_1.nextElement();
  dmtn_child.removeAllChildren();
      }
      reloadTree(selRow);
    } else if (o.length==1) {
      Enumeration enume=rootNode.children();
      while (enume.hasMoreElements()) {
View Full Code Here

      while (enume.hasMoreElements()) {
        DefaultMutableTreeNode dmtn_child=(DefaultMutableTreeNode) enume.nextElement();
  Enumeration enume2=dmtn_child.children();
        while (enume2.hasMoreElements()) {
          DefaultMutableTreeNode dmtn_child_child=(DefaultMutableTreeNode) enume2.nextElement();
    dmtn_child_child.removeAllChildren();
  }
      }
      reloadTree(selRow);
    }
  }
View Full Code Here

                public void run() {
                    USER_MESSAGE_LOGGER.info("Scanning directory...");
                    sourceTree.setCursor(Cursor
                            .getPredefinedCursor(Cursor.WAIT_CURSOR));
                    lastPathComponent.removeAllChildren();
                    new BackgroundChildFileObjectPopulator(lastPathComponent,
                            vfsNode).run();
                    treeModel.reload(lastPathComponent);
                    sourceTree.setCursor(Cursor.getDefaultCursor());
                }
View Full Code Here

        while (treeModel.getChildCount(rootNode) > 0) {
            DefaultMutableTreeNode child =
                (DefaultMutableTreeNode) treeModel.getChild(rootNode, 0);

            treeModel.removeNodeFromParent(child);
            child.removeAllChildren();
            child.removeFromParent();
        }

        treeModel.nodeStructureChanged(rootNode);
        treeModel.reload();
View Full Code Here

  private void updateTypeTree() {
    if (this.ts == null) {
      return;
    }
    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) this.typeTree.getModel().getRoot();
    rootNode.removeAllChildren();
    // UIMA-2565 - Clash btw. cas.Type and Window.Type on JDK 7
    org.apache.uima.cas.Type top = this.ts.getTopType();
    rootNode.setUserObject(top);
    List<org.apache.uima.cas.Type> types = this.ts.getDirectSubtypes(top);
    for (int i = 0; i < types.size(); i++) {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.