Examples of removeAllChildren()


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()

      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

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

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

   *          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

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()

   *          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

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

      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

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

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

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

   
  private void updateTreeModel(GoogleSearchResult results){

    this.searchResults = results;
    DefaultMutableTreeNode root = (DefaultMutableTreeNode)treeModel.getRoot();
    root.removeAllChildren();
    if(results != null){
      for(int i=0;i<results.getResultElements().length;i++){
        GoogleSearchResultElement element = results.getResultElements()[i];
        root.add(new DefaultMutableTreeNode(element));
      }
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.