[patch] partial fix for bug #22150

Lillian Angel langel@redhat.com
Wed Jun 29 19:35:00 GMT 2005


Here is a new patch for these classes. I implemented it so the user can
select paths/rows in the JTree. But still, but visual testing you cannot
see this just yet. I am working on the painting aspect now. In light of
not submitting a massive patch, here is what I have done so far:

Patch attached. Approval Pending.


2005-06-29  Lillian Angel  <langel@redhat.com>

        * javax/swing/JTree.java:
        (valueChanged): repaint everytime something is selected in the 
        tree.
        (setSelectionModel): set TreeSelectionListeners
        (isRowSelected): isRowSelected uses isPathSelected
        * javax/swing/plaf/basic/BasicTreeUI.java
        (setSelectionModel): works with JTree to set the selection model
        (getPathForRow): took out unneeded lines
        (mouseClicked): switched if statements, should check if already 
        selected first.
        (paintLeaf): checked selection of Leaf
        (paintNonLeaf): checked selection of nonLeaf
        (paintRecursive): updated to work with other paint functions
        * javax/swing/tree/DefaultTreeSelectionModel.java:
        (addSelectionPath): fire change, so selection is registered to 
        listener
        (addSelectionPaths): fire change, so selection is registered to 
        listener
        (removeSelectionPath): fire change, so selection is registered 
        to listener
        (removeSelectionPaths): fire change, so selection is registered 
        to listener
        (isPathSelected): took out unneeded lines
        (getTreeSelectionListeners): made more logical to call 
        getListeners
        (fireValueChanged): fixed loop to be more logical
-------------- next part --------------
A non-text attachment was scrubbed...
Name: current.diff
Type: text/x-patch
Size: 7700 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/java-patches/attachments/20050629/36c0a3a6/attachment.bin>


More information about the Java-patches mailing list