A small fix

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

        * javax/swing/JTree.java
        (getAccessibleContext): Fixed API docs, and returned the 
        correct value.
        * javax/swing/plaf/basic/BasicTreeUI.java
        (updateCachedPreferredSize): Fixed parameter passed to 
        isLeaf, node should be passed in and not a path.


On Fri, 2005-10-14 at 10:25 -0400, Lillian Angel wrote:
> Changed getPreferredSize to use updateCachedPreferredSize instead. Also
> fixed a problem in JTree where height was being used instead of width
> (and vice versa). Also, fixed several doc errors.
> 
> 
> 2005-10-14  Lillian Angel  <[EMAIL PROTECTED]>
> 
>         * javax/swing/JTree.java
>         (getAccessibleSelectionCount): Fixed API documentation.
>         (getScrollableTracksViewportWidth): Was using height instead of
>         width, fixed this.
>         (getScrollableTracksViewportHeight): Likewise.
>         * javax/swing/plaf/basic/BasicTreeUI.java
>         (BasicTreeUI): Initialized validCachedPreferredSize.
>         (updateCachedPreferredSize): Implemented.
>         (pathWasExpanded): Implemented.
>         (pathWasCollapsed): Implemented.
>         (installDefaults): Fixed API documentation.
>         (uninstallDefaults): Likewise.
>         (setPreferredMinSize): Likewise.
>         (getPreferredMinSize): Likewise.
>         (getPreferredSize): Reimplemented to use 
>       updateCachedPreferredSize.
>         (startEditing): set validCachedPreferredSize.
>         (editingStopped): Likewise.
>         (editingCanceled): Likewise.
>         (treeExpanded): Likewise.
>         (treeCollaped): Likewise.
>         (treeNodesInserted): Likewise.
>         (treeNodesRemoved): Likewise.
>         (treeStructureChanged): Likewise.
>         (getNextVisibleNode): Fixed API documentation.
>         (getNextNode): Likewise.
>         (getNextSibling): Likewise.
>         (getPreviousSibling): Likewise.
>         (getLevel): Likewise.
>         (paintVerticalPartOfLeg): Likewise.
> 
> _______________________________________________
> Classpath-patches mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/classpath-patches
Index: javax/swing/JTree.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JTree.java,v
retrieving revision 1.46
diff -u -r1.46 JTree.java
--- javax/swing/JTree.java	14 Oct 2005 14:26:35 -0000	1.46
+++ javax/swing/JTree.java	14 Oct 2005 17:26:48 -0000
@@ -1599,13 +1599,13 @@
 
   /**
    * Gets the AccessibleContext associated with this
-   * <code>JToggleButton</code>.
+   * <code>JTree</code>.
    * 
    * @return the associated context
    */
   public AccessibleContext getAccessibleContext()
   {
-    return null;
+    return new AccessibleJTree();
   }
 
   /**
Index: javax/swing/plaf/basic/BasicTreeUI.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/basic/BasicTreeUI.java,v
retrieving revision 1.96
diff -u -r1.96 BasicTreeUI.java
--- javax/swing/plaf/basic/BasicTreeUI.java	14 Oct 2005 14:26:35 -0000	1.96
+++ javax/swing/plaf/basic/BasicTreeUI.java	14 Oct 2005 17:26:48 -0000
@@ -1180,7 +1180,7 @@
             Rectangle bounds = getPathBounds(tree, 
                         curr);  
             if (treeModel != null)
-              isLeaf = treeModel.isLeaf(curr);
+              isLeaf = treeModel.isLeaf(path[i]);
             if (hasControlIcons())
               bounds.width += getCurrentControlIcon(curr).getIconWidth();
             maxWidth = Math.max(maxWidth, bounds.x + bounds.width);
_______________________________________________
Classpath-patches mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/classpath-patches

Reply via email to