[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: small Swing fixes

Kaffe CVS cvs-commits at kaffe.org
Mon Nov 29 07:42:49 PST 2004


PatchSet 5499 
Date: 2004/11/29 15:38:37
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: small Swing fixes

2004-11-29  Dalibor Topic  <robilad at kaffe.org>

        * libraries/javalib/javax/swing/BorderFactory.java,
        libraries/javalib/javax/swing/SwingUtilities.java:
        Resynced with GNU Classpath.

        2004-11-21  Michael Koch  <konqueror at gmx.de>

        * javax/swing/BorderFactory.java
        (BorderFactory): Added private constructor.
        * javax/swing/SwingUtilities.java
        (SwingUtilities): Likewise.
        (computeStringWidth): New method.

Members: 
	ChangeLog:1.3045->1.3046 
	libraries/javalib/javax/swing/BorderFactory.java:1.2->1.3 
	libraries/javalib/javax/swing/SwingUtilities.java:1.6->1.7 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3045 kaffe/ChangeLog:1.3046
--- kaffe/ChangeLog:1.3045	Mon Nov 29 15:28:30 2004
+++ kaffe/ChangeLog	Mon Nov 29 15:38:37 2004
@@ -1,5 +1,19 @@
 2004-11-29  Dalibor Topic  <robilad at kaffe.org>
 
+	* libraries/javalib/javax/swing/BorderFactory.java,
+	libraries/javalib/javax/swing/SwingUtilities.java:
+        Resynced with GNU Classpath.
+
+	2004-11-21  Michael Koch  <konqueror at gmx.de>
+
+        * javax/swing/BorderFactory.java
+        (BorderFactory): Added private constructor.
+        * javax/swing/SwingUtilities.java
+        (SwingUtilities): Likewise.
+        (computeStringWidth): New method.
+
+2004-11-29  Dalibor Topic  <robilad at kaffe.org>
+
 	* libraries/javalib/java/awt/color/ICC_Profile.java,
 	libraries/javalib/java/awt/datatransfer/DataFlavor.java,
 	libraries/javalib/java/awt/image/AffineTransformOp.java:
Index: kaffe/libraries/javalib/javax/swing/BorderFactory.java
diff -u kaffe/libraries/javalib/javax/swing/BorderFactory.java:1.2 kaffe/libraries/javalib/javax/swing/BorderFactory.java:1.3
--- kaffe/libraries/javalib/javax/swing/BorderFactory.java:1.2	Sun Oct 24 13:39:10 2004
+++ kaffe/libraries/javalib/javax/swing/BorderFactory.java	Mon Nov 29 15:38:43 2004
@@ -52,6 +52,11 @@
 
 public class BorderFactory
 {
+  private BorderFactory()
+  {
+    // Do nothing.
+  }
+  
   /**
    * Creates a line border withe the specified color.
    *
Index: kaffe/libraries/javalib/javax/swing/SwingUtilities.java
diff -u kaffe/libraries/javalib/javax/swing/SwingUtilities.java:1.6 kaffe/libraries/javalib/javax/swing/SwingUtilities.java:1.7
--- kaffe/libraries/javalib/javax/swing/SwingUtilities.java:1.6	Wed Nov 24 23:24:28 2004
+++ kaffe/libraries/javalib/javax/swing/SwingUtilities.java	Mon Nov 29 15:38:43 2004
@@ -76,6 +76,11 @@
    */
   private static OwnerFrame ownerFrame;
 
+  private SwingUtilities()
+  {
+    // Do nothing.
+  }
+  
   /**
    * Calculates the portion of the base rectangle which is inside the
    * insets.
@@ -1119,6 +1124,19 @@
       return new Rectangle(dx, dy, dw, dh);
 
     return new Rectangle(0, 0, 0, 0);
+  }
+  
+  /**
+   * Calculates the width of a given string.
+   *
+   * @param fm the <code>FontMetrics</code> object to use
+   * @param str the string
+   * 
+   * @return the width of the the string.
+   */
+  public static int computeStringWidth(FontMetrics fm, String str)
+  {
+    return fm.stringWidth(str);
   }
 
   /**




More information about the kaffe mailing list