Examples of removeAllChildren()


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

      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

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

                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

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

        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

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

  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

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

    if (useCAS) {
      root.setUserObject(indexReposRootLabel);
    } else {
      root.setUserObject(noIndexReposLabel);
    }
    root.removeAllChildren();
    if (this.cas != null && useCAS) {
      FSIndexRepository ir = this.cas.getIndexRepository();
      Iterator<String> it = ir.getLabels();
      while (it.hasNext()) {
        String label = it.next();
View Full Code Here

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

{
  public void test(TestHarness harness)
  {
    DefaultMutableTreeNode n1 = new DefaultMutableTreeNode("A");
    // calling when there are no children should do nothing
    n1.removeAllChildren();
    harness.check(n1.getChildCount(), 0);
   
    DefaultMutableTreeNode n2 = new DefaultMutableTreeNode("B");
    DefaultMutableTreeNode n3 = new DefaultMutableTreeNode("C");
    n1.add(n2);
View Full Code Here

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

        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

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

    TreePath selectionPath[] = getTreeView().getSelectionPath();
    if(selectionPath != null){
      for(int i=0; i < selectionPath.length; i++){
        TreePath treePath = selectionPath[i];     
        DefaultMutableTreeNode treeNode = (DefaultMutableTreeNode) treePath.getLastPathComponent();
        treeNode.removeAllChildren();
        if(treeNode.getParent() != null){
          Object userObject = treeNode.getUserObject();
          if(userObject instanceof Category){
            Category category = (Category)userObject;
            Collection items = categoryDAO.loadItemsForCategory(category.getId());
View Full Code Here

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

  protected void sortTreeModel(Comparator comparator){
    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) getTreeModel().getRoot();   
    Enumeration<DefaultMutableTreeNode> enumeration = rootNode.children();   
    List<DefaultMutableTreeNode> list = Collections.list(enumeration);       
    Collections.sort(list,comparator);   
    rootNode.removeAllChildren();   
    for(DefaultMutableTreeNode node:list){
      rootNode.add(node);
    }   
  }
}
View Full Code Here

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

                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
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.