/[classpath]/classpath/javax/swing/JTree.java
ViewVC logotype

Diff of /classpath/javax/swing/JTree.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.20 by rabbit78, Tue May 17 14:01:36 2005 UTC revision 1.21 by rabbit78, Tue May 17 14:06:17 2005 UTC
# Line 1679  public class JTree extends JComponent Line 1679  public class JTree extends JComponent
1679      return "";      return "";
1680    }    }
1681    
1682      /**
1683       * Returns all TreePath objects which are a descendants of
1684       * the given path and are exapanded at the moment of the
1685       * execution of this method. If the state of any node
1686       * is beeing toggled while this method is executing this
1687       * change may be left unaccounted.
1688       *  
1689       * @param path The parent of this request
1690       * @return An Enumeration containing TreePath objects
1691       */
1692      public Enumeration getExpandedDescendants(TreePath path)
1693      {
1694        Enumeration paths = nodeStates.keys();
1695        Vector relevantPaths = new Vector();
1696        while(paths.hasMoreElements())
1697          {
1698            TreePath nextPath = (TreePath) paths.nextElement();
1699            if(nodeStates.get(nextPath) == EXPANDED &&
1700               path.isDescendant(nextPath))
1701              {
1702                relevantPaths.add(nextPath);
1703              }
1704          }
1705        return relevantPaths.elements();
1706      }
1707  }  }

Legend:
Removed from v.1.20  
changed lines
  Added in v.1.21

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26