bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug swing/29513] New: JTree.scrollPathToVisible/expandPath buglet


From: hendrich at informatik dot uni-hamburg dot de
Subject: [Bug swing/29513] New: JTree.scrollPathToVisible/expandPath buglet
Date: 19 Oct 2006 09:01:05 -0000

A corner case in JTree behaviour:

One of my test applications does the following to ensure that the 
tree node selected by the user becomes visible:

...
TreePath   treepath = new TreePath( node.getPath() );
fileListTree.setSelectionPath( treepath );
fileListTree.scrollPathToVisible( treepath );
fileListTree.expandPath( treepath ); // FIXME: required?

When the selected subtree has more leaf nodes than fit on screen,
classpath (cvs 2006.10.19) scrolls the tree to show the path from
root-node to selected subtree, but the currently selected leaf node
might become invisible. The JDK scrolls the tree to always show the
selected leaf node, which is better.

Note that the above code might be questionable, because the call to
expandPath() after scrollPathToVisible() is redundant. I probably
added it to get an earlier version of classpath or the JDK (1.3.x?)
to work...


-- 
           Summary: JTree.scrollPathToVisible/expandPath buglet
           Product: classpath
           Version: 0.93
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: swing
        AssignedTo: roman at kennke dot org
        ReportedBy: hendrich at informatik dot uni-hamburg dot de


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29513





reply via email to

[Prev in Thread] Current Thread [Next in Thread]