I added a switch in MetalUtils which can turn off the use of Graphics2D
methods, even if the supplied Graphics object is an instance of
Graphics2D. The idea is that it should be possible to turn this off when
the Graphics2D impl is there, but certain features a still not
implemented. In such case you can set the property
gnu.javax.swing.noGraphics2D to not use Java2D specific stuff.
2006-03-03 Roman Kennke <[EMAIL PROTECTED]>
* javax/swing/plaf/metal/MetalUtils.java
(fillMetalPattern): Added switch to not use Graphics2D methods,
even if they are available.
/Roman
Index: javax/swing/plaf/metal/MetalUtils.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/plaf/metal/MetalUtils.java,v
retrieving revision 1.7
diff -u -r1.7 MetalUtils.java
--- javax/swing/plaf/metal/MetalUtils.java 16 Nov 2005 14:36:13 -0000 1.7
+++ javax/swing/plaf/metal/MetalUtils.java 3 Mar 2006 11:10:55 -0000
@@ -37,6 +37,8 @@
package javax.swing.plaf.metal;
+import gnu.classpath.SystemProperties;
+
import java.awt.Color;
import java.awt.Component;
import java.awt.Graphics;
@@ -88,7 +90,8 @@
static void fillMetalPattern(Component c, Graphics g, int x, int y, int w, int h,
Color light, Color dark)
{
- if (g instanceof Graphics2D)
+ if (g instanceof Graphics2D
+ && SystemProperties.getProperty("gnu.javax.swing.noGraphics2D") != null)
fillMetalPattern2D((Graphics2D) g, x, y, w, h, light, dark);
else
{