This is the mail archive of the java-patches@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Patch: AWT tweaks


I'm going to commit this small AWT patch.

regards

  [ bryce ]

2000-07-31  Bryce McKinlay  <bryce@albatross.co.nz>

	* java/awt/Component.java (toString): Implemented.
	* java/awt/Container.java (addImpl): Only call dispatchEvent() to 
	dispatch the event.
	(removeImpl): Ditto.

Index: Component.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/Component.java,v
retrieving revision 1.8
diff -u -r1.8 Component.java
--- Component.java	2000/07/31 02:33:12	1.8
+++ Component.java	2000/07/31 03:58:32
@@ -1283,7 +1283,7 @@
   
   public String toString()
   {
-    return paramString();
+    return this.getClass().getName() + "[" + paramString() + "]";
   }
   
   public void list()
Index: Container.java
===================================================================
RCS file: /cvs/java/libgcj/libjava/java/awt/Container.java,v
retrieving revision 1.6
diff -u -r1.6 Container.java
--- Container.java	2000/07/31 02:03:51	1.6
+++ Container.java	2000/07/31 03:58:32
@@ -154,11 +154,7 @@
     ContainerEvent ce = new ContainerEvent (this,
 					    ContainerEvent.COMPONENT_ADDED,
 					    comp);
-
-    // FIXME: is this right?
     dispatchEvent (ce);
-    if (containerListener != null)
-      containerListener.componentAdded (ce);
   }
 
   public void remove (int index)
@@ -179,11 +175,7 @@
     ContainerEvent ce = new ContainerEvent (this,
 					    ContainerEvent.COMPONENT_REMOVED,
 					    r);
-
-    // FIXME: is this right?
     dispatchEvent (ce);
-    if (containerListener != null)
-      containerListener.componentAdded (ce);
   }
 
   public void remove (Component comp)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]