harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hinde...@apache.org
Subject svn commit: r668664 - /harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java
Date Tue, 17 Jun 2008 13:39:39 GMT
Author: hindessm
Date: Tue Jun 17 06:39:39 2008
New Revision: 668664

URL: http://svn.apache.org/viewvc?rev=668664&view=rev
Log:
Applying patches from "[#HARMONY-5874] Fixes
JComponent.getComponentGraphics() that causes
JComponentTest.testGetComponentGraphics()".

Modified:
    harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java

Modified: harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java
URL: http://svn.apache.org/viewvc/harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java?rev=668664&r1=668663&r2=668664&view=diff
==============================================================================
--- harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java
(original)
+++ harmony/enhanced/classlib/trunk/modules/swing/src/main/java/common/javax/swing/JComponent.java
Tue Jun 17 06:39:39 2008
@@ -1091,7 +1091,10 @@
         }
         result.setFont(getFont());
         result.setColor(getForeground());
-        ((Graphics2D) result).setBackground(getBackground());
+        if (result instanceof Graphics2D) { 		// DebugGraphics class does not have the setBackground
method
+        	((Graphics2D) result).setBackground(getBackground());
+        }
+                
         return result;
     }
 



Mime
View raw message