classpath-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cp-patches] GdkGraphics: set default font when component font is null


From: Thomas Fitzsimmons
Subject: [cp-patches] GdkGraphics: set default font when component font is null
Date: Fri, 09 Sep 2005 19:58:59 -0400

Hi,

I committed this to GNU Classpath.  A component's graphics object must
have a non-null font field even if the component's font is null.

Tom

2005-09-09  Thomas Fitzsimmons  <address@hidden>

        * gnu/java/awt/peer/gtk/GdkGraphics.java
        (GdkGraphics(GtkComponentPeer)): Set font field to a sensible
        default if component font is null.

Index: gnu/java/awt/peer/gtk/GdkGraphics.java
===================================================================
RCS file: /cvsroot/classpath/classpath/gnu/java/awt/peer/gtk/GdkGraphics.java,v
retrieving revision 1.45
diff -u -r1.45 GdkGraphics.java
--- gnu/java/awt/peer/gtk/GdkGraphics.java      21 Aug 2005 05:30:47 -0000      
1.45
+++ gnu/java/awt/peer/gtk/GdkGraphics.java      9 Sep 2005 23:54:41 -0000
@@ -116,6 +116,8 @@
   {
     this.component = component;
     font = component.awtComponent.getFont ();
+    if (font == null)
+      font = new Font ("Dialog", Font.PLAIN, 12);
     color = Color.black;
 
     if (component.isRealized ())

reply via email to

[Prev in Thread] Current Thread [Next in Thread]