Example usage for javax.swing JTree getExpandedDescendants

List of usage examples for javax.swing JTree getExpandedDescendants

Introduction

In this page you can find the example usage for javax.swing JTree getExpandedDescendants.

Prototype

public Enumeration<TreePath> getExpandedDescendants(TreePath parent) 

Source Link

Document

Returns an Enumeration of the descendants of the path parent that are currently expanded.

Usage

From source file:Main.java

public static Enumeration<TreePath> saveExpansionState(JTree tree) {
    return tree.getExpandedDescendants(new TreePath(tree.getModel().getRoot()));
}