harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r495981 - in /harmony/enhanced/classlib/trunk/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicArrowButton.java test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java
Date Sat, 13 Jan 2007 22:10:32 GMT
Author: hindessm
Date: Sat Jan 13 14:10:31 2007
New Revision: 495981

URL: http://svn.apache.org/viewvc?view=rev&rev=495981
Log:
Applying patch from "[#HARMONY-2629] [classlib][swing]
javax.swing.plaf.basic.BasicArrowButton.getBackground() returns wrong
value".

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java
    harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java?view=diff&rev=495981&r1=495980&r2=495981
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java
Sat Jan 13 14:10:31 2007
@@ -47,8 +47,8 @@
                             final Color darkShadow, final Color highlight) {
         BasicArrowButton.shadow = shadow;
         BasicArrowButton.darkShadow = darkShadow;
-
         this.direction = direction;
+        setBackground(background);
     }
 
     public int getDirection() {

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java?view=diff&rev=495981&r1=495980&r2=495981
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/test/api/java/common/javax/swing/plaf/basic/BasicArrowButtonTest.java
Sat Jan 13 14:10:31 2007
@@ -20,6 +20,7 @@
  */
 package javax.swing.plaf.basic;
 
+import java.awt.Color;
 import java.awt.Dimension;
 import javax.swing.SwingConstants;
 import javax.swing.SwingTestCase;
@@ -54,4 +55,16 @@
     public void testFocusTraversable() throws Exception {
         assertFalse(button.isFocusTraversable());
     }
+    
+    /**
+     * Regression test for HARMONY-2629 
+     * */
+    public void testGetBackground() {
+        final Color c = Color.red;
+        BasicArrowButton b = new BasicArrowButton(240, c, c, c, c);
+
+        System.out.println("parameter background == " + c);
+        System.out.println("getBackground()==" + b.getBackground());
+        assertSame(c, b.getBackground());
+    } 
 }



Mime
View raw message