harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mloe...@apache.org
Subject svn commit: r440748 [20/25] - in /incubator/harmony/enhanced/classlib/trunk/modules: accessibility/src/main/java/javax/accessibility/ awt/ awt/make/ awt/src/main/java/common/java/awt/ awt/src/main/java/common/java/awt/datatransfer/ awt/src/main/java/co...
Date Wed, 06 Sep 2006 16:06:30 GMT
Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_X11.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_X11.h?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_X11.h (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_X11.h Wed Sep  6 09:06:15 2006
@@ -18,8 +18,7 @@
  * @version $Revision$
  */
 
-
-/* DO NOT EDIT THIS FILE - it is machine generated */
+/* DO NOT EDIT THIS FILE - it is based on X11 headers and was autogenerated by nativebridge tool */
 
 #include <jni.h>
 #include "nativelib_common.h"
@@ -113,6 +112,8 @@
 
 JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XAllocWMHints(JNIEnv *, jobject);
 
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XGetRGBColormaps(JNIEnv *, jobject, jlong, jlong, jlong, jlong, jlong);
+
 JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XGetVisualInfo(JNIEnv *, jobject, jlong, jlong, jlong, jlong);
 
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XSetFunction(JNIEnv *, jobject, jlong, jlong, jint);
@@ -153,8 +154,12 @@
 
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XPutImage(JNIEnv *, jobject, jlong, jlong, jlong, jlong, jint, jint, jint, jint, jint, jint);
 
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XmuLookupStandardColormap(JNIEnv *, jobject, jlong, jint, jlong, jint, jlong, jint, jint);
+
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XStoreName(JNIEnv *, jobject, jlong, jlong, jlong);
 
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XAllocStandardColormap(JNIEnv *, jobject);
+
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XSetClipRectangles(JNIEnv *, jobject, jlong, jlong, jint, jint, jlong, jint, jint);
 
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XChangeWindowAttributes(JNIEnv *, jobject, jlong, jlong, jlong, jlong);
@@ -214,6 +219,8 @@
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XFreeGC(JNIEnv *, jobject, jlong, jlong);
 
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XBitmapPad(JNIEnv *, jobject, jlong);
+
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XCreateColormap(JNIEnv *, jobject, jlong, jlong, jlong, jint);
 
 JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_X11_XGetPointerMapping(JNIEnv *, jobject, jlong, jlong, jint);
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.cpp?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.cpp (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.cpp Wed Sep  6 09:06:15 2006
@@ -19,7 +19,7 @@
  */
 
 
-/* DO NOT EDIT THIS FILE - it is machine generated */
+/* DO NOT EDIT THIS FILE - it is based on X11 headers and was autogenerated by nativebridge tool */
 
 #include "org_apache_harmony_awt_nativebridge_linux_Xft.h"
 #include "org_apache_harmony_awt_nativebridge_linux_ErrorHandler.h"

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.h?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.h (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/linux/org_apache_harmony_awt_nativebridge_linux_Xft.h Wed Sep  6 09:06:15 2006
@@ -19,7 +19,7 @@
  */
 
 
-/* DO NOT EDIT THIS FILE - it is machine generated */
+/* DO NOT EDIT THIS FILE - it is based on X11 headers and was autogenerated by nativebridge tool */
 
 #include <jni.h>
 #include "nativelib_common.h"

Added: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.cpp
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.cpp?view=auto&rev=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.cpp (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.cpp Wed Sep  6 09:06:15 2006
@@ -0,0 +1,119 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+ /**
+ * @author Oleg V. Khaschansky
+ * @version $Revision$
+ */
+ 
+/* DO NOT EDIT THIS FILE - it is based on GLX headers and was autogenerated by nativebridge tool */
+
+#include "org_apache_harmony_awt_nativebridge_linux_GLX.h"
+
+static libHandler libGL;
+JNIEXPORT void JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_init (JNIEnv * env, jclass cls) {
+    LOAD_LIB(libGL, GL);
+}
+
+
+int (* p_nbridge_glXQueryExtension) (void *, void *, void *) = NULL;
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXQueryExtension( JNIEnv *env, jobject self, jlong dpy, jlong error_base, jlong event_base) {
+    if (p_nbridge_glXQueryExtension == NULL) {
+        p_nbridge_glXQueryExtension = (int (*) (void *, void *, void *)) FindFunction(libGL, "glXQueryExtension");
+    }
+    return (jint) (* p_nbridge_glXQueryExtension)((void *) dpy, (void *) error_base, (void *) event_base);
+}
+
+int (* p_nbridge_glXGetFBConfigAttrib) (void *, void *, int, void *) = NULL;
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXGetFBConfigAttrib( JNIEnv *env, jobject self, jlong dpy, jlong config, jint attribute, jlong value) {
+    if (p_nbridge_glXGetFBConfigAttrib == NULL) {
+        p_nbridge_glXGetFBConfigAttrib = (int (*) (void *, void *, int, void *)) FindFunction(libGL, "glXGetFBConfigAttrib");
+    }
+    return (jint) (* p_nbridge_glXGetFBConfigAttrib)((void *) dpy, (void *) config, (int) attribute, (void *) value);
+}
+
+void * (* p_nbridge_glXCreateNewContext) (void *, void *, int, void *, int) = NULL;
+
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXCreateNewContext( JNIEnv *env, jobject self, jlong dpy, jlong config, jint render_type, jlong share_list, jint direct) {
+    if (p_nbridge_glXCreateNewContext == NULL) {
+        p_nbridge_glXCreateNewContext = (void * (*) (void *, void *, int, void *, int)) FindFunction(libGL, "glXCreateNewContext");
+    }
+    return (jlong) (* p_nbridge_glXCreateNewContext)((void *) dpy, (void *) config, (int) render_type, (void *) share_list, (int) direct);
+}
+
+int (* p_nbridge_glXMakeCurrent) (void *, long, void *) = NULL;
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXMakeCurrent( JNIEnv *env, jobject self, jlong dpy, jlong drawable, jlong ctx) {
+    if (p_nbridge_glXMakeCurrent == NULL) {
+        p_nbridge_glXMakeCurrent = (int (*) (void *, long, void *)) FindFunction(libGL, "glXMakeCurrent");
+    }
+    return (jint) (* p_nbridge_glXMakeCurrent)((void *) dpy, (long) drawable, (void *) ctx);
+}
+
+void (* p_nbridge_glXDestroyContext) (void *, void *) = NULL;
+
+JNIEXPORT void  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXDestroyContext( JNIEnv *env, jobject self, jlong dpy, jlong ctx) {
+    if (p_nbridge_glXDestroyContext == NULL) {
+        p_nbridge_glXDestroyContext = (void (*) (void *, void *)) FindFunction(libGL, "glXDestroyContext");
+    }
+    (* p_nbridge_glXDestroyContext)((void *) dpy, (void *) ctx);
+}
+
+void (* p_nbridge_glXDestroyPbuffer) (void *, long) = NULL;
+
+JNIEXPORT void  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXDestroyPbuffer( JNIEnv *env, jobject self, jlong dpy, jlong pbuf) {
+    if (p_nbridge_glXDestroyPbuffer == NULL) {
+        p_nbridge_glXDestroyPbuffer = (void (*) (void *, long)) FindFunction(libGL, "glXDestroyPbuffer");
+    }
+    (* p_nbridge_glXDestroyPbuffer)((void *) dpy, (long) pbuf);
+}
+
+void * (* p_nbridge_glXChooseFBConfig) (void *, int, void *, void *) = NULL;
+
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXChooseFBConfig( JNIEnv *env, jobject self, jlong dpy, jint screen, jlong attrib_list, jlong nelements) {
+    if (p_nbridge_glXChooseFBConfig == NULL) {
+        p_nbridge_glXChooseFBConfig = (void * (*) (void *, int, void *, void *)) FindFunction(libGL, "glXChooseFBConfig");
+    }
+    return (jlong) (* p_nbridge_glXChooseFBConfig)((void *) dpy, (int) screen, (void *) attrib_list, (void *) nelements);
+}
+
+unsigned long  (* p_nbridge_glXCreatePbuffer) (void *, void *, void *) = NULL;
+
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXCreatePbuffer( JNIEnv *env, jobject self, jlong dpy, jlong config, jlong attrib_list) {
+    if (p_nbridge_glXCreatePbuffer == NULL) {
+        p_nbridge_glXCreatePbuffer = (unsigned long  (*) (void *, void *, void *)) FindFunction(libGL, "glXCreatePbuffer");
+    }
+    return (jlong) (* p_nbridge_glXCreatePbuffer)((void *) dpy, (void *) config, (void *) attrib_list);
+}
+
+void (* p_nbridge_glXSwapBuffers) (void *, long) = NULL;
+
+JNIEXPORT void  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXSwapBuffers( JNIEnv *env, jobject self, jlong dpy, jlong drawable) {
+    if (p_nbridge_glXSwapBuffers == NULL) {
+        p_nbridge_glXSwapBuffers = (void (*) (void *, long)) FindFunction(libGL, "glXSwapBuffers");
+    }
+    (* p_nbridge_glXSwapBuffers)((void *) dpy, (long) drawable);
+}
+
+int (* p_nbridge_glXMakeContextCurrent) (void *, long, long, void *) = NULL;
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXMakeContextCurrent( JNIEnv *env, jobject self, jlong display, jlong draw, jlong read, jlong ctx) {
+    if (p_nbridge_glXMakeContextCurrent == NULL) {
+        p_nbridge_glXMakeContextCurrent = (int (*) (void *, long, long, void *)) FindFunction(libGL, "glXMakeContextCurrent");
+    }
+    return (jint) (* p_nbridge_glXMakeContextCurrent)((void *) display, (long) draw, (long) read, (void *) ctx);
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.h?view=auto&rev=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.h (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/main/native/x11wrapper/org_apache_harmony_awt_nativebridge_linux_GLX.h Wed Sep  6 09:06:15 2006
@@ -0,0 +1,58 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+ /**
+ * @author Oleg V. Khaschansky
+ * @version $Revision$
+ */
+
+/* DO NOT EDIT THIS FILE - it is based on GLX headers and was autogenerated by nativebridge tool */
+
+#include <jni.h>
+#include "nativelib_common.h"
+
+#ifndef _Included_org_apache_harmony_awt_nativebridge_linux_GLX
+#define _Included_org_apache_harmony_awt_nativebridge_linux_GLX
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+JNIEXPORT void JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_init (JNIEnv *, jclass);
+
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXQueryExtension(JNIEnv *, jobject, jlong, jlong, jlong);
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXGetFBConfigAttrib(JNIEnv *, jobject, jlong, jlong, jint, jlong);
+
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXCreateNewContext(JNIEnv *, jobject, jlong, jlong, jint, jlong, jint);
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXMakeCurrent(JNIEnv *, jobject, jlong, jlong, jlong);
+
+JNIEXPORT void  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXDestroyContext(JNIEnv *, jobject, jlong, jlong);
+
+JNIEXPORT void  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXDestroyPbuffer(JNIEnv *, jobject, jlong, jlong);
+
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXChooseFBConfig(JNIEnv *, jobject, jlong, jint, jlong, jlong);
+
+JNIEXPORT jlong  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXCreatePbuffer(JNIEnv *, jobject, jlong, jlong, jlong);
+
+JNIEXPORT void  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXSwapBuffers(JNIEnv *, jobject, jlong, jlong);
+
+JNIEXPORT jint  JNICALL Java_org_apache_harmony_awt_nativebridge_linux_GLX_glXMakeContextCurrent(JNIEnv *, jobject, jlong, jlong, jlong, jlong);
+#ifdef __cplusplus
+}
+#endif
+#endif

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ButtonTest.java Wed Sep  6 09:06:15 2006
@@ -21,7 +21,6 @@
 
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
-import java.awt.event.InputEvent;
 import java.awt.event.KeyAdapter;
 import java.awt.event.KeyEvent;
 import java.awt.event.KeyListener;
@@ -36,52 +35,18 @@
         }
         public TestButton() {
             super();
-        }
-
-        public void paint(Graphics g) {
-            super.paint(g);
-            EventQueue.invokeLater(new Runnable() {
-                public void run() {
-                    paintFlag = true;
-                }
-            });
-        }
+        }        
     }
 
     private TestButton button;
-    private Frame frame;
-    private Insets insets;
     private boolean eventProcessed;
-    private boolean eventExpected;
-    private boolean paintFlag;
 
     protected void setUp() throws Exception {
         super.setUp();
-
-        frame = new Frame();
-        button = new TestButton("Button");
-        frame.add(button);
-        frame.setBounds(0, 0, 100, 100);
-        paintFlag = false;
-        frame.setVisible(true);
-        while (!paintFlag) {
-            Thread.yield();
-        }
-        insets = frame.getInsets();
-        paintFlag = false;
-        frame.setSize(200 + insets.left + insets.right, 200 + insets.top + insets.bottom);
-        frame.validate();
-        while (!paintFlag) {
-            Thread.yield();
-        }
-        while (!button.hasFocus()) {
-            Thread.yield();
-        }
+        button = new TestButton("Button");        
     }
 
     protected void tearDown() throws Exception {
-        frame.dispose();
-
         super.tearDown();
     }
 
@@ -160,98 +125,4 @@
         button.removeKeyListener(listener);
         assertTrue(button.getListeners(KeyListener.class).length == 0);
     }
-
-    Robot robot;
-
-    public void testBehaviour() {
-        try {
-            robot = new Robot();
-        } catch (AWTException e1) {
-            e1.printStackTrace();
-        }
-        robot.setAutoWaitForIdle(true);
-
-        button.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                if (eventExpected) {
-                    eventExpected = false;
-                    eventProcessed = true;
-                } else {
-                    throw new RuntimeException("Unexpected event");
-                }
-            }
-        });
-
-//        colorTest();
-        actionOnMouseTest();
-        actionOnSpaceTest();
-        noActionOnMouseTest();
-        noActionOnSpaceTest();
-    }
-
-    private void colorTest() {
-        assertEquals(SystemColor.control.getRGB(), robot.getPixelColor(insets.left + 10, insets.top + 10).getRGB());
-        paintFlag = false;
-        button.setBackground(Color.green);
-        while (!paintFlag) {
-            Thread.yield();
-        }
-        assertEquals(Color.green, robot.getPixelColor(insets.left + 10, insets.top + 10));
-        button.setBackground(null);
-    };
-
-    private void noActionOnSpaceTest() {
-        eventExpected = false;
-        robot.keyPress(KeyEvent.VK_SPACE);
-        eventProcessed = false;
-        button.setFocusable(false);
-        robot.keyRelease(KeyEvent.VK_SPACE);
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-        }
-        assertFalse(eventProcessed);
-    }
-
-    private void noActionOnMouseTest() {
-        eventExpected = false;
-        robot.mouseMove(insets.left + 99, insets.top + 99);
-        robot.mouseMove(insets.left + 100, insets.top + 100);
-        robot.mousePress(InputEvent.BUTTON1_MASK);
-        eventProcessed = false;
-        robot.mouseMove(insets.left + 200, insets.top + 200);
-        robot.mouseRelease(InputEvent.BUTTON1_MASK);
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-        }
-        assertFalse(eventProcessed);
-    }
-
-    private void actionOnSpaceTest() {
-        eventExpected = false;
-        robot.keyPress(KeyEvent.VK_SPACE);
-        eventExpected = true;
-        eventProcessed = false;
-        robot.keyRelease(KeyEvent.VK_SPACE);
-        while (!eventProcessed) {
-            Thread.yield();
-        }
-        assertTrue(eventProcessed);
-    }
-
-    private void actionOnMouseTest() {
-        eventExpected = false;
-        robot.mouseMove(insets.left + 99, insets.top + 99);
-        robot.mouseMove(insets.left + 100, insets.top + 100);
-        robot.mousePress(InputEvent.BUTTON1_MASK);
-        eventExpected = true;
-        eventProcessed = false;
-        robot.mouseRelease(InputEvent.BUTTON1_MASK);
-        while (!eventProcessed) {
-            Thread.yield();
-        }
-        assertTrue(eventProcessed);
-    }
-
 }

Added: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.java?view=auto&rev=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.java Wed Sep  6 09:06:15 2006
@@ -0,0 +1,153 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author Dmitry A. Durnev
+ * @version $Revision$
+ */
+package java.awt;
+
+import junit.framework.TestCase;
+
+public class CardLayoutRTest extends TestCase {
+    Container emptyContainer;
+    Dimension defSize;
+    CardLayout layout;
+    private Dimension maxSize;
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(CardLayoutRTest.class);
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        emptyContainer = new Container();
+        defSize = new Dimension();
+        maxSize = new Dimension(Integer.MAX_VALUE, Integer.MAX_VALUE);
+        layout = new CardLayout();
+    }
+    
+    public void testFirst() {        
+        try {
+            layout.first(emptyContainer);
+        } catch (IllegalArgumentException iae) {
+            return;            
+        }
+        fail();
+    }
+
+    
+    public final void testGetLayoutAlignmentX1() {
+        try {
+            layout.getLayoutAlignmentX(null);
+        } catch (Throwable t) {
+            fail();
+        }        
+    }
+    
+    public final void testGetLayoutAlignmentX2() {        
+        try {
+            layout.getLayoutAlignmentX(emptyContainer);
+        } catch (Throwable t) {
+            fail();
+        }        
+    }
+    
+    public final void testGetLayoutAlignmentY1() {
+        try {
+            layout.getLayoutAlignmentY(null);
+        } catch (Throwable t) {
+            fail();
+        }        
+    }
+    
+    public final void testGetLayoutAlignmentY2() {        
+        try {
+            layout.getLayoutAlignmentY(emptyContainer);
+        } catch (Throwable t) {
+            fail();
+        }        
+    }
+    
+    public void testLast() {        
+        try {
+            layout.last(emptyContainer);
+        } catch (IllegalArgumentException iae) {
+            return;            
+        }
+        fail();
+    }
+    
+    public void testLayoutContainer() {       
+        try {
+            layout.layoutContainer(emptyContainer);
+        } catch (Throwable t) {
+            fail();
+        }
+        assertTrue(true);
+    }
+    
+    public final void testMaximumLayoutSize1() {
+        try {
+            assertEquals(maxSize, layout.maximumLayoutSize(null));
+        } catch (Throwable t) {
+            fail();
+        }        
+    }
+    
+    public final void testMaximumLayoutSize2() {        
+        try {
+            assertEquals(maxSize, layout.maximumLayoutSize(emptyContainer));
+        } catch (Throwable t) {
+            fail();
+        }        
+    }
+
+
+    public final void testMinimumLayoutSize() {
+        assertEquals(defSize, layout.minimumLayoutSize(emptyContainer));
+    }
+    
+    public void testNext() {        
+        try {
+            layout.next(emptyContainer);
+        } catch (IllegalArgumentException iae) {
+            return;            
+        }
+        fail();
+    }
+    
+    public final void testPreferredLayoutSize() {
+        assertEquals(defSize, layout.preferredLayoutSize(emptyContainer));
+    }   
+    
+    public void testPrevious() {        
+        try {
+            layout.previous(emptyContainer);
+        } catch (IllegalArgumentException iae) {
+            return;            
+        }
+        fail();
+    }
+    
+    public void testRemoveLayoutComponent() {       
+        try {
+            layout.removeLayoutComponent(emptyContainer);
+        } catch (Throwable t) {
+            fail();
+        }
+    }
+    
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.xml?view=auto&rev=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.xml (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CardLayoutRTest.xml Wed Sep  6 09:06:15 2006
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Copyright 2005 - 2006 The Apache Software Foundation or its licensors, as applicable.
+  
+    Licensed under the Apache License, Version 2.0 (the "License");
+    you may not use this file except in compliance with the License.
+    You may obtain a copy of the License at
+  
+       http://www.apache.org/licenses/LICENSE-2.0
+  
+    Unless required by applicable law or agreed to in writing, software
+    distributed under the License is distributed on an "AS IS" BASIS,
+    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+    See the License for the specific language governing permissions and
+    limitations under the License.
+-->
+<!DOCTYPE Test SYSTEM "test.dtd">
+<!--
+Author:  Dmitry A. Durnev
+Version: $Revision$
+-->
+<Test
+       ID="CardLayoutRTest"
+       date-of-creation="2006-04-03"
+       timeout="1"
+       >       
+               <Copyright value="Intel Corporation"/>
+               <Author value="Dmitry A. Durnev"/>
+               <Description>
+                       Regression test testFirst() for bug #7545#
+                       Regression test testGetLayoutAlignmentX1() for bug #7545#               
+                       Regression test testGetLayoutAlignmentX2() for bug #7545#               
+                       Regression test testGetLayoutAlignmentY1() for bug #7545#               
+                       Regression test testGetLayoutAlignmentY2() for bug #7545#
+                       Regression test testLast() for bug #7545#                                       
+                       Regression test testLayoutContainer() for bug #7545#                            
+                       Regression test testMaximumLayoutSize1() for bug #7545#         
+                       Regression test testMaximumLayoutSize2() for bug #7545#         
+                       Regression test testMinimumLayoutSize() for bug #7545#
+                       Regression test testNext() for bug #7545#                       
+                       Regression test testPreferredLayoutSize() for bug #7545#
+                       Regression test testPrevious() for bug #7545#
+                       Regression test testRemoveLayoutComponent() for bug #7545#                      
+               </Description>
+
+               <Keyword name="regression"/>
+               <Source name="CardLayoutRTest.java"/>
+                       
+               <Runner ID="JUExec">
+                       <Param name="JUnit" value="java.awt.CardLayoutRTest"/>
+               </Runner>
+
+</Test>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/CheckboxTest.java Wed Sep  6 09:06:15 2006
@@ -21,7 +21,6 @@
 
 import java.awt.event.ItemEvent;
 import java.awt.event.ItemListener;
-import java.awt.event.KeyEvent;
 
 import junit.framework.TestCase;
 
@@ -58,49 +57,26 @@
             super.paint(g);
             EventQueue.invokeLater(new Runnable() {
                 public void run() {
-                    paintFlag = true;
                 }
             });
         }
     }
 
     private TestCheckbox checkbox;
-    private Frame frame;
-    private Insets insets;
     private boolean eventProcessed;
-    private boolean eventExpected;
-    private boolean paintFlag;
 
     /*
      * @see TestCase#setUp()
      */
     protected void setUp() throws Exception {
-        super.setUp();
-
-        frame = new Frame();
+        super.setUp();        
         checkbox = new TestCheckbox("Checkbox");
-        frame.add(checkbox);
-        frame.setBounds(0, 0, 100, 100);
-        paintFlag = false;
-        frame.setVisible(true);
-        while (!paintFlag) {
-            Thread.yield();
-        }
-        insets = frame.getInsets();
-        paintFlag = false;
-        frame.setSize(200 + insets.left + insets.right,
-                      200 + insets.top + insets.bottom);
-        frame.validate();
-        while (!paintFlag) {
-            Thread.yield();
-        }
     }
 
     /*
      * @see TestCase#tearDown()
      */
     protected void tearDown() throws Exception {
-        frame.dispose();
         super.tearDown();
     }
 
@@ -227,102 +203,5 @@
 
         checkbox.removeItemListener(listener);
         assertEquals(0, checkbox.getListeners(cls).length);
-    }
-
-    Robot robot;
-
-    public void testBehaviour() {
-        try {
-            robot = new Robot();
-        } catch (AWTException e1) {
-            e1.printStackTrace();
-        }
-        robot.setAutoWaitForIdle(true);
-
-        checkbox.addItemListener(new ItemListener() {
-            public void itemStateChanged(ItemEvent ie) {
-                if (eventExpected) {
-                    eventExpected = false;
-                    eventProcessed = true;
-                } else {
-                    //throw new RuntimeException("Unexpected event");
-                }
-            }
-        });
-
-        colorTest();
-        actionOnMouseTest();
-        actionOnSpaceTest();
-        noActionOnMouseTest();
-        noActionOnSpaceTest();
-    }
-
-    private void colorTest() {
-        assertEquals(checkbox.getBackground().getRGB(),
-                     robot.getPixelColor(insets.left + 10,
-                                         insets.top + 10).getRGB());
-        paintFlag = false;
-        checkbox.setBackground(Color.blue);
-        while (!paintFlag) {
-            Thread.yield();
-        }
-        assertEquals(Color.blue,
-                     robot.getPixelColor(insets.left + 10,
-                                         insets.top + 10));
-        checkbox.setBackground(null);
-    };
-
-    private void noActionOnSpaceTest() {
-        eventExpected = false;
-        robot.keyPress(KeyEvent.VK_SPACE);
-        eventProcessed = false;
-        checkbox.setFocusable(false);
-        robot.keyRelease(KeyEvent.VK_SPACE);
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-        }
-        assertFalse(eventProcessed);
-    }
-
-    private void noActionOnMouseTest() {
-        eventExpected = false;
-        robot.mouseMove(insets.left + 99, insets.top + 99);
-        robot.mouseMove(insets.left + 100, insets.top + 100);
-        robot.mousePress(KeyEvent.BUTTON1_MASK);
-        eventProcessed = false;
-        robot.mouseMove(insets.left + 200, insets.top + 200);
-        robot.mouseRelease(KeyEvent.BUTTON1_MASK);
-        try {
-            Thread.sleep(1000);
-        } catch (InterruptedException e) {
-        }
-        assertFalse(eventProcessed);
-    }
-
-    private void actionOnSpaceTest() {
-        eventExpected = false;
-        robot.keyPress(KeyEvent.VK_SPACE);
-        eventExpected = true;
-        eventProcessed = false;
-        robot.keyRelease(KeyEvent.VK_SPACE);
-        while (!eventProcessed) {
-            Thread.yield();
-        }
-        assertTrue(eventProcessed);
-    }
-
-    private void actionOnMouseTest() {
-        eventExpected = false;
-        robot.mouseMove(insets.left + 99, insets.top + 99);
-        robot.mouseMove(insets.left + 100, insets.top + 100);
-        robot.mousePress(KeyEvent.BUTTON1_MASK);
-        eventExpected = true;
-        eventProcessed = false;
-        robot.mouseRelease(KeyEvent.BUTTON1_MASK);
-        while (!eventProcessed) {
-            Thread.yield();
-        }
-        assertTrue(eventProcessed);
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ComponentRTest.java Wed Sep  6 09:06:15 2006
@@ -54,6 +54,22 @@
         assertTrue(((Boolean)oldVal).booleanValue());
 
     }
+    
+    public final void testGetMinimumSize() {
+        final Component comp = new Component() {
+        };
+        Dimension size = new Dimension(100, 100);
+        Dimension defSize = new Dimension(1, 1);
+        comp.setSize(size);
+        assertEquals(size, comp.getMinimumSize());
+        comp.addNotify();
+        assertEquals(defSize, comp.getMinimumSize());
+        size.setSize(13, 13);
+        comp.setSize(size);
+        assertEquals(defSize, comp.getMinimumSize());
+        comp.removeNotify();
+        assertEquals(size, comp.getMinimumSize());
+    }
 
     public static void main(String[] args) {
         junit.textui.TestRunner.run(ComponentRTest.class);

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/FileDialogTest.java Wed Sep  6 09:06:15 2006
@@ -29,6 +29,7 @@
  */
 public class FileDialogTest extends TestCase {
     Frame frame;
+    Dialog dialog;
     FileDialog fd;
 
     public static void main(String[] args) {
@@ -37,6 +38,7 @@
     protected void setUp() throws Exception {
         super.setUp();
         frame = new Frame();
+        dialog = new Dialog(frame);
         fd = new FileDialog(frame);
     }
 
@@ -70,6 +72,55 @@
         assertTrue(fd.isModal());
         assertNull(fd.getFile());
         assertNull(fd.getDirectory());
+    }
+    
+    private final void constructorTestDialog() {        
+        assertSame(dialog, fd.getParent());
+        assertTrue(fd.isModal());
+        assertNull(fd.getFile());
+        assertNull(fd.getDirectory());
+    }
+    
+    /*
+     * Class under test for void FileDialog(java.awt.Frame)
+     */
+    public final void testFileDialogDialog() {
+        fd = new FileDialog(dialog);
+        constructorTestDialog();
+        assertEquals("", fd.getTitle());
+        assertEquals(FileDialog.LOAD, fd.getMode());
+
+    }
+
+    /*
+     * Class under test for void FileDialog(java.awt.Frame, java.lang.String)
+     */
+    public final void testFileDialogDialogString() {
+        String title = "Open";
+        fd = new FileDialog(dialog, title);
+        constructorTestDialog();
+        assertEquals(title, fd.getTitle());
+        assertEquals(FileDialog.LOAD, fd.getMode());
+    }
+
+    /*
+     * Class under test for void FileDialog(java.awt.Frame, java.lang.String, int)
+     */
+    public final void testFileDialogDialogStringint() {
+        String title = "Save";
+        int mode = FileDialog.SAVE;
+        fd = new FileDialog(dialog, title, mode);
+        constructorTestDialog();
+        assertEquals(title, fd.getTitle());
+        assertEquals(mode, fd.getMode());
+        boolean iae = false;
+        try {
+            fd = new FileDialog(dialog, title, mode = -666);
+        } catch (IllegalArgumentException e) {
+            iae = true;
+        }
+        assertTrue(iae);
+        assertEquals(FileDialog.SAVE, fd.getMode());
     }
     /*
      * Class under test for void FileDialog(java.awt.Frame)

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/GridBagLayoutRTest.java Wed Sep  6 09:06:15 2006
@@ -115,5 +115,40 @@
             fail();
         }
     }
-
+    
+    static void addToGridBag(Panel panel, Component comp, int x, int y, int w,
+                             int h, double weightx, double weighty) {
+        GridBagLayout gbl = (GridBagLayout) panel.getLayout();
+        GridBagConstraints c = new GridBagConstraints();
+        c.fill = GridBagConstraints.BOTH;
+        c.gridx = x;
+        c.gridy = y;
+        c.gridwidth = w;
+        c.gridheight = h;
+        c.weightx = weightx;
+        c.weighty = weighty;
+        panel.add(comp);
+        gbl.setConstraints(comp, c);
+    }
+    
+    public final void testZeroWeights() {
+        Dimension minSize = new Dimension(10, 25);
+        final Panel p = new Panel(new GridBagLayout());
+        addToGridBag(p, new Button(), 0, 0, 1, 1, 0, 0);
+        addToGridBag(p, new Button(), 0, 1, 1, 1, 0, 0);
+        addToGridBag(p, new Button(), 0, 2, 1, 1, 0, 0);
+        for (int i=0; i < p.getComponentCount(); i++) {
+            p.getComponent(i).setMinimumSize(minSize);
+        }
+        Dimension size = new Dimension(minSize);
+        size.height -= 15;
+        p.setSize(size);
+        p.doLayout();
+        assertEquals("first component has zero height", 0,
+                     p.getComponent(0).getHeight());
+        assertEquals("second component has height < min", 18,
+                     p.getComponent(1).getHeight());
+        assertEquals("third component has min height", minSize.height,
+                     p.getComponent(2).getHeight());
+    }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/ListTest.java Wed Sep  6 09:06:15 2006
@@ -117,24 +117,6 @@
     }
 
     /*
-     * Class under test for java.awt.Dimension getPreferredSize()
-     */
-    public final void testGetPreferredSize() {
-        Dimension prefSize = list.getPreferredSize();
-        assertEquals(new Dimension(), prefSize);
-        Frame f = new Frame("");
-        f.add(list);
-        f.addNotify();
-        Dimension minSize = list.getMinimumSize();
-        assertEquals(minSize, list.getPreferredSize());
-        list.add("12345678901234567890");
-        prefSize = list.getPreferredSize();
-        assertEquals(minSize.height, prefSize.height);
-        assertTrue(prefSize.width > minSize.width);
-        f.dispose();
-    }
-
-    /*
      * Class under test for java.awt.Dimension preferredSize()
      */
     public final void testPreferredSize() {
@@ -326,24 +308,6 @@
         int fontSize = list.getFont().getSize();
         assertTrue("min height > font size * i", minSize.height > i * fontSize);
         assertTrue("min width > 0", minSize.width > 0);
-        f.dispose();
-    }
-
-    /*
-     * Class under test for java.awt.Dimension getPreferredSize(int)
-     */
-    public final void testGetPreferredSizeint() {
-        int i = 3;
-        assertEquals(new Dimension(), list.getPreferredSize(i));
-        Frame f = new Frame("");
-        f.add(list);
-        f.pack();
-        Dimension minSize = list.getMinimumSize(i);
-        assertEquals(minSize, list.getPreferredSize(i));
-        list.add("12345678901234567890");
-        Dimension prefSize = list.getPreferredSize(i);
-        assertEquals("minSize.height == prefSize.height", minSize.height, prefSize.height);
-        assertTrue("prefSize.width > minSize.width", prefSize.width > minSize.width);
         f.dispose();
     }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/MenuTest.java Wed Sep  6 09:06:15 2006
@@ -28,40 +28,8 @@
 import junit.framework.TestCase;
 
 public class MenuTest extends TestCase {
-
-    Frame frame;
-    Component comp;
-
-    boolean bMenuShown;
-    volatile boolean bMenuClicked;
-    boolean bMenuHidden;
-    volatile boolean bEndModalLoop;
-    Robot robot;
-
-    protected void setUp() throws Exception {
-        super.setUp();
-
-        frame = new Frame("MenuTest");
-        frame.setBounds(100, 100, 300, 200);
-        comp = new Component() {
-            public void paint(Graphics g) {
-                g.setColor(Color.yellow);
-                g.fillRect(0, 0, getWidth(), getHeight());
-            }
-        };
-        frame.add(comp);
-    }
-
-    protected void tearDown() throws Exception {
-        if (frame.isDisplayable()) {
-            frame.dispose();
-        }
-        robot = null;
-
-        super.tearDown();
-    }
-
     public void testAddRemove() {
+        Component comp = new Component() {};
         // create topmost menu
         PopupMenu popup = new PopupMenu();
         comp.add(popup);
@@ -87,17 +55,11 @@
 
         // remove submenu from topmost menu
         popup.remove(menu);
-        assertNull(menu.getParent());
         assertEquals(1, popup.getItemCount());
 
         // remove item from topmost menu
         popup.remove(item);
-        assertNull(item.getParent());
         assertEquals(0, popup.getItemCount());
-
-        // remove topmost menu from component
-        comp.remove(popup);
-        assertNull(popup.getParent());
     }
 
     public void testAddRemoveListener() {
@@ -109,102 +71,5 @@
         assertNotNull(item.getActionListeners());
         assertEquals(1, item.getActionListeners().length);
         assertEquals(listener, item.getActionListeners()[0]);
-    }
-
-    public void testShowPopupMenu() {
-        bMenuShown = bMenuClicked = bMenuHidden = false;
-        bEndModalLoop = false;
-        frame.setVisible(true);
-
-        final PopupMenu popup = new PopupMenu();
-        final Object endModalLoop = new Object();
-        comp.add(popup);
-        assertEquals(comp, popup.getParent());
-
-        comp.addMouseListener(new MouseAdapter() {
-            public void mouseReleased(MouseEvent e) {
-                if (e.getButton() != MouseEvent.BUTTON3) {
-                    return;
-                }
-                popup.show(comp, 10, 10);
-                synchronized(endModalLoop) {
-                    bEndModalLoop = true;
-                    endModalLoop.notifyAll();
-                }
-            }
-        });
-
-        // add single item to the popup menu
-        MenuItem item = new MenuItem("Item");
-        item.setActionCommand("item");
-        item.addActionListener(new ActionListener() {
-            public void actionPerformed(ActionEvent e) {
-                synchronized(robot) {
-                    bMenuClicked = true;
-                    robot.notifyAll();
-                }
-            }
-        });
-        popup.add(item);
-
-        assertEquals("Item", item.getLabel());
-        assertEquals("item", item.getActionCommand());
-        assertEquals(popup, item.getParent());
-
-        try {
-            robot = new Robot();
-            robot.setAutoDelay(100);
-        } catch (AWTException e) {
-            fail("failed to create robot " + e.getMessage());
-        }
-
-        Point clickLocation = comp.getLocation();
-        Point shift = frame.getLocation();
-        Point menuLocation = new Point(10, 10);
-        clickLocation.x += shift.x + menuLocation.x + 5;
-        clickLocation.y += shift.y + menuLocation.y + 5;
-
-        try {
-            synchronized(robot) {
-                // simulate right-click
-                robot.mouseMove(clickLocation.x, clickLocation.y);
-                clickLocation.translate(20, 5);
-                robot.mousePress(MouseEvent.BUTTON3_MASK);
-                robot.mouseRelease(MouseEvent.BUTTON3_MASK);
-                robot.mouseMove(clickLocation.x, clickLocation.y);
-
-                // wait until popup menu is shown
-                bMenuShown = waitForPixelChange(clickLocation, false);
-                assertTrue("show menu", bMenuShown && !bMenuClicked && !bMenuHidden);
-
-                synchronized(endModalLoop) {
-                    // click the menu item
-                    robot.mousePress(MouseEvent.BUTTON1_MASK);
-                    robot.mouseRelease(MouseEvent.BUTTON1_MASK);
-
-                    robot.wait(5000);
-                    assertTrue("click menu", bMenuClicked);
-                
-                    endModalLoop.wait(5000);
-                    assertTrue("end modal loop", bEndModalLoop);
-                }
-
-                // wait until menu is hidden
-                bMenuHidden = waitForPixelChange(clickLocation, true);
-                assertTrue("hide menu", bMenuHidden);
-            }
-        } catch (InterruptedException e) {
-            fail("robot thread interrupted " + e.getMessage());
-        }
-    }
-
-    boolean waitForPixelChange(Point point, boolean equals) throws InterruptedException {
-        for (int i=0; i<50; i++) {
-            Thread.sleep(100);
-            if (robot.getPixelColor(point.x, point.y).equals(Color.yellow) == equals) {
-                return true;
-            }
-        }
-        return false;
     }
 }

Modified: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/RobotTest.java Wed Sep  6 09:06:15 2006
@@ -26,6 +26,7 @@
 import java.awt.event.MouseWheelEvent;
 import java.awt.event.MouseWheelListener;
 import java.awt.image.BufferedImage;
+import java.awt.image.ColorModel;
 import java.math.BigInteger;
 import java.security.Permission;
 
@@ -71,14 +72,13 @@
 
     private void waitForButton() {
         int timeout = 16, time = 0;
-        int nAttempts = 10;
+        int nAttempts = 10;        
         f.add(b);
         f.setSize(100, 100);
         int x = 50;
         int y = 50;
-        Color bkColor = robot.getPixelColor(x, y);
-        Color btnColor = new Color(bkColor.getRGB() + 100);
-        b.setBackground(btnColor);
+        Color bkColor = robot.getPixelColor(x, y);        
+        b.setBackground(getNextColor(bkColor));
         f.show();
 
         for (int i = 0; i < nAttempts; i++) {
@@ -94,6 +94,25 @@
         }
 
         assertEquals("button is shown", b.getBackground(), robot.getPixelColor(x, y));
+    }
+
+    private int inv(int val) {
+        return ~val & 0xFF;
+    }
+    
+    private Color getNextColor(Color bkColor) {
+        Color color = bkColor;
+        ColorModel cm = f.getGraphicsConfiguration().getColorModel();
+        Object pixel = null;
+        while (color.equals(bkColor)) {
+
+            color = new Color(inv(color.getRed()), inv(color.getGreen()),
+                    inv(color.getBlue()));
+
+            pixel = cm.getDataElements(color.getRGB(), pixel);
+            color = new Color(cm.getRGB(pixel));
+        }
+        return color;
     }
 
     public final void testToString() {

Added: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java?view=auto&rev=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/java/awt/image/IndexColorModelRTest.java Wed Sep  6 09:06:15 2006
@@ -0,0 +1,102 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/**
+ * @author ivstolya
+ * @version $Revision$
+ */
+package java.awt.image;
+
+import java.awt.Transparency;
+
+import junit.framework.TestCase;
+
+public class IndexColorModelRTest extends TestCase {
+    IndexColorModel icm1, icm2, icm3, icm4, icm5, icm6;
+    byte r, g, b, a;
+    byte cmap1[], cmap2[];
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(IndexColorModelRTest.class);
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        r = (byte)0x1f;
+        g = (byte)0x5f;
+        b = (byte)0xff;
+        a = (byte)0x7f;
+        
+        cmap1 = new byte[6];
+        cmap1[3] = r;
+        cmap1[4] = g;
+        cmap1[5] = b;
+        
+        cmap2 = new byte[8];
+        cmap2[4] = r;
+        cmap2[5] = g;
+        cmap2[6] = b;
+        cmap2[7] = a;
+        
+        icm1 = new IndexColorModel(1 ,2, cmap1, 0, false, -1);  
+        icm2 = new IndexColorModel(1 ,2, cmap1, 0, false, 0);  
+        icm3 = new IndexColorModel(1 ,2, cmap2, 0, true, 1);  
+        icm4 = new IndexColorModel(1 ,2, cmap2, 0, true, 0);  
+        icm5 = new IndexColorModel(1 ,2, cmap2, 0, true, -1);  
+        
+        cmap2[3] = a;
+        icm6 = new IndexColorModel(1 ,2, cmap2, 0, true, 1);  
+    }
+    
+    public final void testIndexColorModelConstructor(){
+        int map[] = new int[2];
+        icm1.getRGBs(map);
+        assertEquals(0xff000000, map[0]);
+        assertEquals(0xff1f5fff, map[1]);
+        assertEquals(Transparency.OPAQUE, icm1.getTransparency());
+        assertEquals(-1, icm1.getTransparentPixel());
+        
+        icm2.getRGBs(map);
+        assertEquals(0x00000000, map[0]);
+        assertEquals(0xff1f5fff, map[1]);
+        assertEquals(Transparency.BITMASK, icm2.getTransparency());
+        assertEquals(0, icm2.getTransparentPixel());
+        
+        icm3.getRGBs(map);
+        assertEquals(0x00000000, map[0]);
+        assertEquals(0x001f5fff, map[1]);
+        assertEquals(Transparency.BITMASK, icm3.getTransparency());
+        assertEquals(1, icm3.getTransparentPixel());
+        
+        icm4.getRGBs(map);
+        assertEquals(0x00000000, map[0]);
+        assertEquals(0x7f1f5fff, map[1]);
+        assertEquals(Transparency.TRANSLUCENT, icm4.getTransparency());
+        assertEquals(0, icm4.getTransparentPixel());
+        
+        icm5.getRGBs(map);
+        assertEquals(0x00000000, map[0]);
+        assertEquals(0x7f1f5fff, map[1]);
+        assertEquals(Transparency.TRANSLUCENT, icm5.getTransparency());
+        assertEquals(0, icm5.getTransparentPixel());
+
+        icm6.getRGBs(map);
+        assertEquals(0x7f000000, map[0]);
+        assertEquals(0x001f5fff, map[1]);
+        assertEquals(Transparency.TRANSLUCENT, icm6.getTransparency());
+        assertEquals(1, icm6.getTransparentPixel());
+        
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java?view=auto&rev=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownThreadTest.java Wed Sep  6 09:06:15 2006
@@ -0,0 +1,49 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Pavel Dolgov
+ * @version $Revision$
+ */
+package org.apache.harmony.awt.wtk;
+
+import junit.framework.TestCase;
+
+public class ShutdownThreadTest extends TestCase {
+    
+    private ShutdownThread t;
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(ShutdownThreadTest.class);
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        t = new ShutdownThread();
+    }
+
+    public void testStartAndShutdown() {
+        assertFalse(t.isAlive());
+        t.start();
+        assertTrue(t.isAlive());
+        t.shutdown();
+        try {
+            Thread.sleep(100);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+        assertFalse(t.isAlive());
+    }
+}

Added: incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java?view=auto&rev=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java (added)
+++ incubator/harmony/enhanced/classlib/trunk/modules/awt/src/test/api/java/common/org/apache/harmony/awt/wtk/ShutdownWatchdogTest.java Wed Sep  6 09:06:15 2006
@@ -0,0 +1,125 @@
+/*
+ *  Copyright 2005 - 2006 The Apache Software Software Foundation or its licensors, as applicable.
+ *
+ *  Licensed under the Apache License, Version 2.0 (the "License");
+ *  you may not use this file except in compliance with the License.
+ *  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+/** 
+ * @author Pavel Dolgov
+ * @version $Revision$
+ */
+package org.apache.harmony.awt.wtk;
+
+import junit.framework.TestCase;
+
+public class ShutdownWatchdogTest extends TestCase {
+    
+    private ShutdownWatchdog wd;
+
+    public static void main(String[] args) {
+        junit.textui.TestRunner.run(ShutdownWatchdogTest.class);
+    }
+
+    protected void setUp() throws Exception {
+        super.setUp();
+        wd = new ShutdownWatchdog();
+    }
+    
+    public void testSetWindowListEmptyTrue() {
+        intro();
+        wd.setWindowListEmpty(true);
+        sleep();
+        assertFalse(isShutdownThreadRunning());
+        outro();
+    }
+    
+    public void testSetWindowListEmptyFalse() {
+        intro();
+        wd.setWindowListEmpty(false);
+        assertTrue(isShutdownThreadRunning());
+        outro();
+    }
+
+    public void testSetAwtQueueEmptyTrue() {
+        intro();
+        wd.setAwtQueueEmpty(true);
+        sleep();
+        assertFalse(isShutdownThreadRunning());
+        outro();
+    }
+    
+    public void testSetAwtQueueEmptyFalse() {
+        intro();
+        wd.setAwtQueueEmpty(false);
+        assertTrue(isShutdownThreadRunning());
+        outro();
+    }
+
+    public void testSetNativeQueueEmptyTrue() {
+        intro();
+        wd.setNativeQueueEmpty(true);
+        sleep();
+        assertFalse(isShutdownThreadRunning());
+        outro();
+    }
+    
+    public void testSetNativeQueueEmptyFalse() {
+        intro();
+        wd.setNativeQueueEmpty(false);
+        assertTrue(isShutdownThreadRunning());
+        outro();
+    }
+
+    public void testStartThenForceShutdown() {
+        intro();
+        outro();
+    }
+    
+    private void intro() {
+        assertFalse(isShutdownThreadRunning());
+        wd.start();
+        assertTrue(isShutdownThreadRunning());
+    }
+    
+    private void outro() {
+        wd.forceShutdown();
+        sleep();
+        assertFalse(isShutdownThreadRunning());
+    }
+    
+    private boolean isShutdownThreadRunning() {
+        ThreadGroup g = Thread.currentThread().getThreadGroup();
+        Thread[] threads = new Thread[g.activeCount() + 1];
+        while(true) {
+            int actualCount = g.enumerate(threads);
+            if (actualCount < threads.length) {
+                break;
+            }
+            threads = new Thread[actualCount + 1];
+        }
+        for (int i = 0; i < threads.length; i++) {
+            if ((threads[i] != null) && 
+                    threads[i].getName().equals("AWT-Shutdown")) {
+                return true;
+            }
+        }
+        return false;
+    }
+    
+    private void sleep() {
+        try {
+            Thread.sleep(100);
+        } catch (InterruptedException e) {
+            e.printStackTrace();
+        }
+    }
+}

Modified: incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/java/org/apache/harmony/misc/accessors/ObjectAccessor.java Wed Sep  6 09:06:15 2006
@@ -860,6 +860,10 @@
 
     private final native long getStaticFieldID(Class c, String name, String sig);
 
-
+    public final native long getGlobalReference(Object o);
+    
+    public final native void releaseGlobalReference(long ref);
+    
+    public final native Object getObjectFromReference(long ref);
 }
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessor.h
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessor.h?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessor.h (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessor.h Wed Sep  6 09:06:15 2006
@@ -438,6 +438,27 @@
     jclass);
 
 
+/*
+ * Method: org.apache.harmony.misc.accessors.ObjectAccessor.getGlobalReference(Ljava/lang/Object;)J
+ */
+JNIEXPORT jlong JNICALL
+Java_org_apache_harmony_misc_accessors_ObjectAccessor_getGlobalReference(JNIEnv *, jobject, 
+    jobject);
+
+/*
+ * Method: org.apache.harmony.misc.accessors.ObjectAccessor.releaseGlobalReference(J)V
+ */
+JNIEXPORT void JNICALL
+Java_org_apache_harmony_misc_accessors_ObjectAccessor_releaseGlobalReference(JNIEnv *, jobject, 
+    jlong);
+
+/*
+ * Method: org.apache.harmony.misc.accessors.ObjectAccessor.getObjectFromReference(J)Ljava/lang/Object;
+ */
+JNIEXPORT jobject JNICALL
+Java_org_apache_harmony_misc_accessors_ObjectAccessor_getObjectFromReference(JNIEnv *, jobject, 
+    jlong);
+
 #ifdef __cplusplus
 }
 #endif

Modified: incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/misc/src/main/native/accessors/shared/org_apache_harmony_misc_accessors_ObjectAccessorImpl.c Wed Sep  6 09:06:15 2006
@@ -390,6 +390,36 @@
     return res;
 }
 
+/*
+ * Class: org_apache_harmony_misc_accessors_ObjectAccessor
+ * Method: getGlobalReference
+ * Signature: (Ljava/lang/Object;)J
+ */
+JNIEXPORT jlong JNICALL Java_org_apache_harmony_misc_accessors_ObjectAccessor_getGlobalReference
+(JNIEnv * env, jobject accessorObj, jobject obj) {
+    return (jlong)(intptr_t)(*env)->NewGlobalRef(env, obj);
+}
+
+/*
+ * Class: org_apache_harmony_misc_accessors_ObjectAccessor
+ * Method: releaseGlobalReference
+ * Signature: (J)V
+ */
+JNIEXPORT void JNICALL Java_org_apache_harmony_misc_accessors_ObjectAccessor_releaseGlobalReference
+(JNIEnv * env, jobject accessorObj, jlong ref) {
+    (*env)->DeleteGlobalRef(env, (jobject)(intptr_t)ref);
+}
+
+/*
+ * Class: org_apache_harmony_misc_accessors_ObjectAccessor
+ * Method: getObjectFromReference
+ * Signature: (J)Ljava/lang/Object;
+ */
+JNIEXPORT jobject JNICALL Java_org_apache_harmony_misc_accessors_ObjectAccessor_getObjectFromReference
+(JNIEnv * env, jobject accessorObj, jlong ref) {
+    return (jobject)(intptr_t)ref;
+}
+
 
 
 

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/build.xml
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/build.xml?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/build.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/build.xml Wed Sep  6 09:06:15 2006
@@ -127,7 +127,7 @@
         <property name="test.jre.home" value="${hy.jdk}/jre" />
 
         <junit fork="yes"
-               forkmode="once"
+               forkmode="perTest"
                printsummary="withOutAndErr"
                errorproperty="test.errors"
                failureproperty="test.failures"
@@ -187,6 +187,29 @@
                     <exclude name="javax/swing/text/TextAction_MultithreadedTest.java"/>
                     <exclude name="javax/swing/text/ViewTestHelpers.java"/>
                     <exclude name="javax/swing/text/View_ForwardUpdateRTest.java"/>
+
+                    <exclude name="javax/swing/JComboBoxRTest.java"/>
+                    <exclude name="javax/swing/JComboBoxTest.java"/>
+                    <exclude name="javax/swing/JComponentTest.java"/>
+                    <exclude name="javax/swing/JMenuTest.java"/>
+                    <exclude name="javax/swing/JSplitPaneTest.java"/>
+                    <exclude name="javax/swing/JTableTest.java"/>
+                    <exclude name="javax/swing/RepaintManagerTest.java"/>
+                    <exclude name="javax/swing/plaf/basic/BasicBordersTest.java"/>
+                    <exclude name="javax/swing/plaf/basic/BasicComboBoxUITest.java"/>
+                    <exclude name="javax/swing/plaf/basic/BasicLookAndFeelTest.java"/>
+                    <exclude name="javax/swing/plaf/basic/BasicProgressBarUITest.java"/>
+                    <exclude name="javax/swing/plaf/basic/BasicSplitPaneDividerTest.java"/>
+                    <exclude name="javax/swing/plaf/basic/BasicSplitPaneUITest.java"/>
+                    <exclude name="javax/swing/plaf/metal/MetalComboBoxUITest.java"/>
+                    <exclude name="javax/swing/plaf/metal/MetalLookAndFeelTest.java"/>
+                    <exclude name="javax/swing/text/AbstractDocument_AbstractElementRTest.java"/>
+                    <exclude name="javax/swing/text/DefaultStyledDocumentRTest.java"/>
+                    <exclude name="javax/swing/text/GapContent_GapVectorTest.java"/>
+                    <exclude name="javax/swing/text/GlyphView_AttributesTest.java"/>
+                    <exclude name="org/apache/harmony/x/swing/plaf/resources/basic/BasicResourceBundleTest.java"/>
+
+
                 </fileset>
             </batchtest>
         </junit>

Modified: incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java
URL: http://svn.apache.org/viewvc/incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java?view=diff&rev=440748&r1=440747&r2=440748
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java (original)
+++ incubator/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/AbstractButton.java Wed Sep  6 09:06:15 2006
@@ -712,10 +712,8 @@
     }
 
     public void setEnabled(final boolean enabled) {
-        if (model.isEnabled() != enabled) {
-            model.setEnabled(enabled);
-            super.setEnabled(enabled);
-        }
+        model.setEnabled(enabled);
+        super.setEnabled(enabled);
     }
 
     public void setContentAreaFilled(final boolean filled) {



Mime
View raw message