Package javax.swing.tree

Examples of javax.swing.tree.TreeNode


    }
  }


  public void setDetailText(final TreePath treePath) {
    final TreeNode treeNode = getTreeNodeFromPath(treePath);

    if (treeNode instanceof BugInstanceNode) {
      final BugInstanceNode bugNode = (BugInstanceNode) treeNode;

      if (_parent != null) {
View Full Code Here


    if (node instanceof BugInstanceNode && node.isLeaf()) {

      Collections.sort(_childs, new ChildComparator());

      incrementMemberCount();
      TreeNode treeNode = getParent();
      while (treeNode != null && treeNode instanceof BugInstanceGroupNode) {
        ((BugInstanceGroupNode) treeNode).incrementMemberCount();
        treeNode = treeNode.getParent();
      }
    }
  }
View Full Code Here


  List<String> _getPath() {
    final List<String> list = new ArrayList<String>();

    TreeNode node = this;
    while (node != null) {
      if (node instanceof BugInstanceGroupNode) {
        list.add(((BugInstanceGroupNode) node).getGroupName());
        node = node.getParent();
      }
    }
    //Collections.reverse(list);

    return list;
View Full Code Here


  List<String> _getPath() {
    final List<String> list = new ArrayList<String>();

    TreeNode node = getParent();
    while (node != null) {
      if (node instanceof BugInstanceGroupNode) {
        list.add(((BugInstanceGroupNode) node).getGroupName());
        node = node.getParent();
      }
    }
    //Collections.reverse(list);

    return list;
View Full Code Here

    // tag
    if (node.getChildCount() > 0) {
      divider.activateBranch(facesContext);
      facesContext.getResponseWriter().write("(" + label + ")\n");
      for (int i = 0; i < node.getChildCount(); i++) {
        TreeNode sub = node.getChildAt(i);
        render(facesContext, (DefaultMutableTreeNode) sub);
      }
      facesContext.getResponseWriter().write("(/" + label + ")\n");
      divider.passivateBranch(facesContext);
    }
View Full Code Here

        if (!node.isLeaf()) {
            size = data.getSize()// -> that is the value defined in xpd file

            for (Enumeration e = node.children(); e.hasMoreElements();) {              
                TreeNode child = (TreeNode)e.nextElement();
                DisplayPackageDescription childInfo = getInfo(child);
               
                childInfo.setState(child, newState);
               
                if (childInfo.isSelected())   {
View Full Code Here

            if (!node.isLeaf()) {
                updateState(node);
            }

            try {
                TreeNode parent = node.getParent();
                DisplayPackageDescription parentInfo = getInfo(parent);
               
                parentInfo.updateState(parent);
                try {
                    TreeNode grandpa = parent.getParent();
                    DisplayPackageDescription grandpaInfo = getInfo(grandpa);
               
                    grandpaInfo.updateState(grandpa);
                } catch (java.lang.IllegalArgumentException e) {
                    /* ignore */
 
View Full Code Here

        int state = PackageDescription.DONT_KNOW;
        InstallData installdata = InstallData.getInstance();
        size = data.getSize()// -> that is the value defined in xpd file

        for (Enumeration e = node.children(); e.hasMoreElements();) {           
            TreeNode child = (TreeNode) e.nextElement();
            DisplayPackageDescription childInfo = getInfo(child);
           
            int childState = childInfo.getState();

            if ((state == PackageDescription.DONT_KNOW) || (state == PackageDescription.IGNORE)) {
View Full Code Here

    public void updateSize(TreeNode node)
    {
        size = data.getSize()// -> that is the value defined in xpd file
       
        for (Enumeration e = node.children(); e.hasMoreElements();) {           
            TreeNode child = (TreeNode) e.nextElement();
            DisplayPackageDescription childInfo = getInfo(child);
            if (childInfo.isSelected()) {
                size += childInfo.getSize(child);
            }
        }
View Full Code Here

      node = node.getParent();
      n++;
    }
    path = new int[n - 1];
    for (int i = n - 2; i >= 0; i--) {
      TreeNode parent = list.get(i + 1);
      TreeNode child = list.get(i);
      for (int j = 0; j < parent.getChildCount(); j++) {
        if (parent.getChildAt(j) == child) { // == is okay in this case
          path[n - 2 - i] = j;
          break;
        }
View Full Code Here

TOP

Related Classes of javax.swing.tree.TreeNode

Copyright © 2018 www.massapicom. 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.