[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: swing fixes

Kaffe CVS cvs-commits at kaffe.org
Fri Aug 12 13:23:44 PDT 2005


PatchSet 6817 
Date: 2005/08/12 20:14:26
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: swing fixes

2005-08-10  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

        2005-08-12  Lillian Angel  <langel at redhat.com>

        * javax/swing/plaf/basic/BasicTreeUI.java
        (getCellLocation): Added in a check to make sure the node has children.
        Fixed loop to use post-increment.
        (paintRecursive): Fixed loop to use post-increment.
        (paintControlIcons): Likewise.
        (getNextNode): Fixed check to make sure that node has children.
        (getPreviousSibling): Added in check to make sure index is in correct
        range.

        2005-08-11  Lillian Angel  <langel at redhat.com>

        * javax/swing/plaf/basic/BasicViewportUI.java
        (paintSimple): This line was causing problems with the JTable viewport.
        However, the scrollpane still needs to be fixed. It is still not
        painting beyond the view's bounds.

        2005-08-10  Lillian Angel  <langel at redhat.com>

        * javax/swing/plaf/basic/BasicTreeUI.java
        (mouseClicked): Called fireTreeWillExpand and fireTreeWillCollapse when
        appropriate.
        (keyPressed): Likewise.

Members: 
	ChangeLog:1.4342->1.4343 
	libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java:1.16->1.17 
	libraries/javalib/javax/swing/plaf/basic/BasicViewportUI.java:1.8->1.9 
	replace/getifaddrs.c:1.4->1.5 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.4342 kaffe/ChangeLog:1.4343
--- kaffe/ChangeLog:1.4342	Fri Aug 12 02:37:24 2005
+++ kaffe/ChangeLog	Fri Aug 12 20:14:26 2005
@@ -1,3 +1,32 @@
+2005-08-10  Dalibor Topic  <robilad at kaffe.org>
+
+	Resynced with GNU Classpath.
+
+	2005-08-12  Lillian Angel  <langel at redhat.com>
+
+        * javax/swing/plaf/basic/BasicTreeUI.java
+        (getCellLocation): Added in a check to make sure the node has children.
+        Fixed loop to use post-increment.
+        (paintRecursive): Fixed loop to use post-increment.
+        (paintControlIcons): Likewise.
+        (getNextNode): Fixed check to make sure that node has children.
+        (getPreviousSibling): Added in check to make sure index is in correct
+        range.
+
+	2005-08-11  Lillian Angel  <langel at redhat.com>
+
+        * javax/swing/plaf/basic/BasicViewportUI.java
+        (paintSimple): This line was causing problems with the JTable viewport.
+        However, the scrollpane still needs to be fixed. It is still not
+        painting beyond the view's bounds.
+
+	2005-08-10  Lillian Angel  <langel at redhat.com>
+
+        * javax/swing/plaf/basic/BasicTreeUI.java
+        (mouseClicked): Called fireTreeWillExpand and fireTreeWillCollapse when
+        appropriate.
+        (keyPressed): Likewise.
+
 2005-08-11  Andreas Tobler  <a.tobler at schweiz.ch>
 
        * kaffe/kaffevm/jni/jni.c (Kaffe_DefineClass): Cast buf to match the
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java:1.16 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java:1.17
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java:1.16	Thu Aug 11 01:18:50 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicTreeUI.java	Fri Aug 12 20:14:30 2005
@@ -2620,7 +2620,8 @@
       }
 
     if (!mod.isLeaf(startNode)
-        && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))))
+        && tree.isExpanded(new TreePath(getPathToRoot(startNode, 0))) 
+        && mod.getChildCount(startNode) > 0)
       {
         Object child = mod.getChild(startNode, 0);
         if (child != null)
@@ -2711,7 +2712,7 @@
         int max = mod.getChildCount(curr);
         if (tree.isExpanded(new TreePath(getPathToRoot(curr, 0))))
           {
-            for (int i = 0; i < max; ++i)
+            for (int i = 0; i < max; i++)
               {
                 int indent = indentation + rightChildIndent;
                 if (!isRootVisible && depth == 0)
@@ -2783,7 +2784,7 @@
             if (!node.equals(mod.getRoot()))
               ei.paintIcon(tree, g, indentation - rightChildIndent - 3, h);
 
-            for (int i = 0; i < max; ++i)
+            for (int i = 0; i < max; i++)
               {
                 int indent = indentation + rightChildIndent;
                 if (depth == 0 && !tree.isRootVisible())
@@ -2930,7 +2931,7 @@
   Object getNextNode(Object curr)
   {
     TreeModel mod = tree.getModel();
-    if (mod.getChildCount(curr) != 0)
+    if (mod.getChildCount(curr) > 0)
       return mod.getChild(curr, 0);
 
     Object node = curr;
@@ -3013,7 +3014,7 @@
 
     int index = mod.getIndexOfChild(parent, node) - 1;
 
-    if (index < 0)
+    if (index < 0 || index >= mod.getChildCount(parent))
       return null;
 
     return mod.getChild(parent, index);
Index: kaffe/libraries/javalib/javax/swing/plaf/basic/BasicViewportUI.java
diff -u kaffe/libraries/javalib/javax/swing/plaf/basic/BasicViewportUI.java:1.8 kaffe/libraries/javalib/javax/swing/plaf/basic/BasicViewportUI.java:1.9
--- kaffe/libraries/javalib/javax/swing/plaf/basic/BasicViewportUI.java:1.8	Mon Aug  8 02:52:28 2005
+++ kaffe/libraries/javalib/javax/swing/plaf/basic/BasicViewportUI.java	Fri Aug 12 20:14:31 2005
@@ -161,7 +161,7 @@
                            Rectangle portBounds)
   {
     Rectangle oldClip = g.getClipBounds();
-    g.setClip(portBounds);
+    g.setClip(oldClip.intersection(viewBounds));
     g.translate (-pos.x, -pos.y);
     try
       {   
Index: kaffe/replace/getifaddrs.c
diff -u kaffe/replace/getifaddrs.c:1.4 kaffe/replace/getifaddrs.c:1.5
--- kaffe/replace/getifaddrs.c:1.4	Sun Jul 17 18:01:00 2005
+++ kaffe/replace/getifaddrs.c	Fri Aug 12 20:14:31 2005
@@ -36,6 +36,8 @@
 #define __close(x) close(x)
 #endif
 
+#include "ifaddrs_linux.c"
+
 #elif defined(SIOCGIFCONF)
 
 #include "ifaddrs_bsd.c"



More information about the kaffe mailing list