Package javax.swing.tree

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


  private void updateTypeTree() {
    if (this.ts == null) {
      return;
    }
    DefaultMutableTreeNode rootNode = (DefaultMutableTreeNode) this.typeTree.getModel().getRoot();
    rootNode.removeAllChildren();
    Type top = this.ts.getTopType();
    rootNode.setUserObject(top);
    List types = this.ts.getDirectSubtypes(top);
    for (int i = 0; i < types.size(); i++) {
      rootNode.add(createTypeTree((Type) types.get(i)));
View Full Code Here


    @SuppressWarnings("unchecked")
    Enumeration<DefaultMutableTreeNode> children = node.children();
    while (children.hasMoreElements()) {
      DefaultMutableTreeNode child = children.nextElement();
      System.out.println("removing children of " + ((NodeInfo) child.getUserObject()).getFullName());
      child.removeAllChildren();
    }
  }
 
  @Override
  public void valueChanged(TreeSelectionEvent e) {
View Full Code Here

   *          point will be rendered in the tree.
   */
  private void updateSelectedAnnotationTree(int aPosition) {
    DefaultMutableTreeNode root = (DefaultMutableTreeNode) this.selectedAnnotationTreeModel
            .getRoot();
    root.removeAllChildren();
    FSIterator annotIter = this.mCAS.getAnnotationIndex().iterator();
    while (annotIter.isValid()) {
      AnnotationFS annot = (AnnotationFS) annotIter.get();
      // if (getPanePosition(annot.getBegin()) <= aPosition
      // && getPanePosition(annot.getEnd()) > aPosition)
View Full Code Here

      Object userObj = expandedNode.getUserObject();
      if (userObj instanceof FsTreeNodeObject) {
        TreeNode firstChild = expandedNode.getFirstChild();
        if (firstChild instanceof DefaultMutableTreeNode
                && ((DefaultMutableTreeNode) firstChild).getUserObject() == null) {
          expandedNode.removeAllChildren();
          FeatureStructure fs = ((FsTreeNodeObject) userObj).getFS();
          addFeatureTreeNodes(expandedNode, fs);
          ((JTree) event.getSource()).treeDidChange();
        }
View Full Code Here

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

                DefaultMutableTreeNode serverNode = getSelectedServerNode();
                if (serverNode == null) {
                    return;
                }

                serverNode.removeAllChildren();

                MongoServer mongoServer = (MongoServer) serverNode.getUserObject();
                mongoManager.loadServer(mongoServer);

                addIfPossibleDatabase(mongoServer, serverNode);
View Full Code Here

        JTree resultTree = getUIHandlers().getResultTreeHandler().getResultTree();
        DefaultTreeModel model = (DefaultTreeModel) resultTree.getModel();

        DefaultMutableTreeNode root = (DefaultMutableTreeNode) model.getRoot();

        root.removeAllChildren();
        model.reload();

        URL[] result = getResoureFinder().findResource(resourceName, classpathURLs);
        if (result == null || result.length == 0) {
            DefaultMutableTreeNode newChild = new DefaultMutableTreeNode("Resource Not Found!");
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.