harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r952568 - in /harmony/enhanced/java/trunk/classlib/modules/swing/src: main/java/common/javax/swing/plaf/basic/BasicArrowButton.java test/api/java.injected/javax/swing/plaf/basic/BasicArrowButtonTest.java
Date Tue, 08 Jun 2010 08:26:12 GMT
Author: hindessm
Date: Tue Jun  8 08:26:11 2010
New Revision: 952568

URL: http://svn.apache.org/viewvc?rev=952568&view=rev
Log:
Fixing "[#HARMONY-6543] [classlib] [swing]
javax.swing.plaf.basic.BasicArrowButton".
Removing unnecessary output from test.

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

Modified: harmony/enhanced/java/trunk/classlib/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java?rev=952568&r1=952567&r2=952568&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/swing/src/main/java/common/javax/swing/plaf/basic/BasicArrowButton.java
Tue Jun  8 08:26:11 2010
@@ -35,19 +35,23 @@ import org.apache.harmony.x.swing.Utilit
 public class BasicArrowButton extends JButton implements SwingConstants {
     protected int direction;
 
-    private static Color shadow = UIManager.getColor("ScrollBar.shadow");
-    private static Color darkShadow = UIManager.getColor("ScrollBar.darkShadow");
+    private Color shadow;
+    private Color darkShadow;
 
     public BasicArrowButton(final int direction) {
         this.direction = direction;
+        shadow = UIManager.getColor("ScrollBar.shadow");
+        darkShadow = UIManager.getColor("ScrollBar.darkShadow");
     }
 
-    public BasicArrowButton(final int direction, final Color background, final Color shadow,
-                            final Color darkShadow, final Color highlight) {
-        BasicArrowButton.shadow = shadow;
-        BasicArrowButton.darkShadow = darkShadow;
+    public BasicArrowButton(final int direction, final Color background,
+                            final Color shadow, final Color darkShadow,
+                            final Color highlight) {
+        this.shadow = shadow;
+        this.darkShadow = darkShadow;
         this.direction = direction;
         setBackground(background);
+        // TOFIX: highlight is ignored
     }
 
     public int getDirection() {
@@ -82,7 +86,10 @@ public class BasicArrowButton extends JB
         return false;
     }
 
-    public void paintTriangle(final Graphics g, final int x, final int y, final int size,
final int direction, final boolean isEnabled) {
-        Utilities.fillArrow(g, x, y, direction, size, false, isEnabled ? darkShadow : shadow);
+    public void paintTriangle(final Graphics g, final int x, final int y,
+                              final int size, final int direction,
+                              final boolean isEnabled) {
+        Utilities.fillArrow(g, x, y, direction, size, false,
+                            isEnabled ? darkShadow : shadow);
     }
 }

Modified: harmony/enhanced/java/trunk/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicArrowButtonTest.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/java/trunk/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicArrowButtonTest.java?rev=952568&r1=952567&r2=952568&view=diff
==============================================================================
--- harmony/enhanced/java/trunk/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicArrowButtonTest.java
(original)
+++ harmony/enhanced/java/trunk/classlib/modules/swing/src/test/api/java.injected/javax/swing/plaf/basic/BasicArrowButtonTest.java
Tue Jun  8 08:26:11 2010
@@ -75,9 +75,6 @@ public class BasicArrowButtonTest extend
     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