/[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.47 by langel, Fri Oct 14 17:30:31 2005 UTC revision 1.48 by langel, Tue Oct 18 15:02:43 2005 UTC
# Line 2046  public class JTree Line 2046  public class JTree
2046    {    {
2047      if (path == null)      if (path == null)
2048        return;        return;
2049        
2050        Object[] oPath = path.getPath();
2051        TreePath temp = new TreePath(oPath[0]);
2052        boolean stop = false;
2053        int i = 1;
2054        while (!stop)
2055          {
2056            while (isVisible(temp))
2057              if (i < oPath.length)
2058                temp = temp.pathByAddingChild(oPath[i++]);
2059              else
2060                {
2061                  stop = true;
2062                  break;
2063                }
2064            makeVisible(temp);
2065          }
2066      Rectangle rect = getPathBounds(path);      Rectangle rect = getPathBounds(path);
   
     if (rect == null)  
       return;  
   
2067      scrollRectToVisible(rect);      scrollRectToVisible(rect);
2068        setSelectionPath(temp);
2069    }    }
2070    
2071    public void scrollRowToVisible(int row)    public void scrollRowToVisible(int row)

Legend:
Removed from v.1.47  
changed lines
  Added in v.1.48

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