public static void collapseAll ( JTree tree , boolean omitRoot ) { int rows = tree . getRowCount ( ) ; int limit = ( omitRoot ? 1 : 0 ) ; for ( int i = rows - 1 ; i >= limit ; i -- ) { tree . collapseRow ( i ) ; } }
Collapse all rows of the given tree