[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: swing fixes from graydon

Kaffe CVS cvs-commits at kaffe.org
Sat Jan 29 06:40:49 PST 2005


PatchSet 5936 
Date: 2005/01/29 14:35:26
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: swing fixes from graydon

2005-01-27  Dalibor Topic  <robilad at kaffe.org>

        Resynced with GNU Classpath.

2005-01-27  Graydon Hoare  <graydon at redhat.com>

* java/awt/dnd/DropTarget.java
(addDropTargetListener): Despite documentation, do not throw.
* javax/swing/JComponent.java: Set a default DropTarget.

Members: 
	ChangeLog:1.3475->1.3476 
	libraries/javalib/java/awt/dnd/DropTarget.java:1.6->1.7 
	libraries/javalib/javax/swing/JComponent.java:1.11->1.12 

Index: kaffe/ChangeLog
diff -u kaffe/ChangeLog:1.3475 kaffe/ChangeLog:1.3476
--- kaffe/ChangeLog:1.3475	Sat Jan 29 12:17:29 2005
+++ kaffe/ChangeLog	Sat Jan 29 14:35:26 2005
@@ -1,3 +1,13 @@
+2005-01-27  Dalibor Topic  <robilad at kaffe.org>
+
+        Resynced with GNU Classpath.
+	
+	2005-01-27  Graydon Hoare  <graydon at redhat.com>
+
+	* java/awt/dnd/DropTarget.java
+	(addDropTargetListener): Despite documentation, do not throw.
+	* javax/swing/JComponent.java: Set a default DropTarget.
+
 2005-01-29  Dalibor Topic  <robilad at kaffe.org>
 
 	* include/Makefile.am (NOINSTALL_JNI_DERIVED_HDRS): Only create
Index: kaffe/libraries/javalib/java/awt/dnd/DropTarget.java
diff -u kaffe/libraries/javalib/java/awt/dnd/DropTarget.java:1.6 kaffe/libraries/javalib/java/awt/dnd/DropTarget.java:1.7
--- kaffe/libraries/javalib/java/awt/dnd/DropTarget.java:1.6	Mon Oct  4 09:01:34 2004
+++ kaffe/libraries/javalib/java/awt/dnd/DropTarget.java	Sat Jan 29 14:35:29 2005
@@ -211,9 +211,10 @@
   public void addDropTargetListener (DropTargetListener dtl)
     throws TooManyListenersException
   {
-    if (dtl != null)
-      throw new TooManyListenersException ();
-    
+    // Sun's JDK does not, despite documentation, throw any sort of
+    // exception here when you install an additional DropTargetListener.
+    // So to be compatible, we do the same thing.
+
     dropTargetListener = dtl;
   }
 
Index: kaffe/libraries/javalib/javax/swing/JComponent.java
diff -u kaffe/libraries/javalib/javax/swing/JComponent.java:1.11 kaffe/libraries/javalib/javax/swing/JComponent.java:1.12
--- kaffe/libraries/javalib/javax/swing/JComponent.java:1.11	Wed Jan 26 13:40:05 2005
+++ kaffe/libraries/javalib/javax/swing/JComponent.java	Sat Jan 29 14:35:29 2005
@@ -1,5 +1,5 @@
 /* JComponent.java -- Every component in swing inherits from this class.
-   Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+   Copyright (C) 2002, 2004, 2005  Free Software Foundation, Inc.
 
 This file is part of GNU Classpath.
 
@@ -50,6 +50,7 @@
 import java.awt.Insets;
 import java.awt.Point;
 import java.awt.Rectangle;
+import java.awt.dnd.DropTarget;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
 import java.awt.event.ContainerEvent;
@@ -395,6 +396,7 @@
   {
     super();
     super.setLayout(new FlowLayout());
+    setDropTarget(new DropTarget());
     defaultLocale = Locale.getDefault();
     debugGraphicsOptions = DebugGraphics.NONE_OPTION;
   }




More information about the kaffe mailing list