The click-area for a leaf was slightly off. Fixed.

2005-10-06  Lillian Angel  <[EMAIL PROTECTED]>

        * javax/swing/plaf/basic/BasicTreeUI.java
        (mousePressed): Shouldn't change x location for leaf.



On Wed, 2005-10-05 at 17:49 -0400, Lillian Angel wrote:
> Small fix. Added in a comment as a reminder to fix last bit of painting
> problem.
> 
> 2005-10-05  Lillian Angel  <[EMAIL PROTECTED]>
> 
>         * javax/swing/plaf/basic/BasicTreeUI.java
>         (paintRow): Fixed indentation.
>         (updateCurrentVisiblePath): Added FIXME
>         comment.
> 
> 
> 
> On Wed, 2005-10-05 at 17:28 -0400, Lillian Angel wrote:
> > Fixed up BasicTreeUI because it was not efficent when painting.
> > 
> > 2005-10-05  Lillian Angel  <[EMAIL PROTECTED]>
> > 
> >         * javax/swing/plaf/metal/MetalTreeUI.java
> >         (installUI): Fixed to call toggleExpandState instead.
> >         * javax/swing/plaf/basic/BasicTreeUI.java
> >         (getPathForRow): Used currentVisiblePath to get Path.
> >         (getRowForPath): Used currentVisiblePath to get row.
> >         (getRowCount): Returned currentVisiblePath length.
> >         (updateLayoutCacheExpandedNodes): Took out unneeded code.
> >         (installUI): Fixed to call toggleExpandState instead.
> >         (getPreferredSize): Made more efficent by using 
> >     currentVisiblePath.
> >         (toggleExpandState): Called updateCurrentVisiblePath.
> >         (getCellLocation): Made more efficent.
> >         (paintNode): Removed.
> >         (paintRecursive): Made more efficent, changed paintNode calls to
> >         paintRow.
> >         (getNextVisibleNode): Reimplemented to use currentVisiblePath.
> >         (getPreviousVisibleNode): Likewise.
> >         (paintRow): Implemented.
> >         (updateCurrentVisiblePath): New helper used to cache the current
> >         visible path.
> > 
> > _______________________________________________
> > Classpath-patches mailing list
> > [email protected]
> > http://lists.gnu.org/mailman/listinfo/classpath-patches
> _______________________________________________
> Classpath-patches mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/plaf/basic/BasicTreeUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.86
diff -u -r1.86 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java	5 Oct 2005 21:50:17 -0000	1.86
+++ javax/swing/plaf/basic/BasicTreeUI.java	6 Oct 2005 13:43:00 -0000
@@ -2278,10 +2278,7 @@
           boolean cntlClick = isLocationInExpandControl(path, click.x, click.y);
           
           if (isLeaf(row))
-            {
-              bounds.x -= rightChildIndent - 4;
               bounds.width += rightChildIndent + 4;
-            }
           else if (tree.isExpanded(path) && expandedIcon != null)
               bounds.width += expandedIcon.getIconWidth() + 4;
           else if (collapsedIcon != null)
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to