Java JTree Expand expandAllNodes(JTree tree, int startingIndex, int rowCount)

Here you can find the source of expandAllNodes(JTree tree, int startingIndex, int rowCount)

Description

expand All Nodes

License

LGPL

Declaration

public static void expandAllNodes(JTree tree, int startingIndex, int rowCount) 

Method Source Code

//package com.java2s;
//License from project: LGPL 

import javax.swing.JTree;

public class Main {
    public static void expandAllNodes(JTree tree) {
        expandAllNodes(tree, 0, tree.getRowCount());
    }//from www.ja  va 2s . c  o  m

    public static void expandAllNodes(JTree tree, int startingIndex, int rowCount) {
        for (int i = startingIndex; i < rowCount; ++i) {
            tree.expandRow(i);
        }
        if (tree.getRowCount() != rowCount) {
            expandAllNodes(tree, rowCount, tree.getRowCount());
        }
    }
}

Related

  1. expandAll(JTree tree, boolean expand)
  2. expandAllNode(JTree tree, TreePath parent)
  3. expandAllNodes(final JTree tree)
  4. expandAllNodes(JTree tree)
  5. expandAllNodes(JTree tree)
  6. expandAllNodes(JTree tree, int startingIndex, int rowCount)
  7. expandAllNodes(JTree tree, TreeNode node)
  8. expandByExpansionStateStrings(final JTree tree, final TreePath parent, ArrayList expansionStateStrings)
  9. expandFirstNode(JTree tree)