[kaffe] CVS kaffe (robilad): Resynced with GNU Classpath: paramString implementations

Kaffe CVS cvs-commits at kaffe.org
Sat Jan 29 07:50:14 PST 2005


PatchSet 5942 
Date: 2005/01/29 15:39:55
Author: robilad
Branch: HEAD
Tag: (none) 
Log:
Resynced with GNU Classpath: paramString implementations

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

        Resynced with GNU Classpath.

2005-01-28  Michael Koch  <konqueror at gmx.de>

* java/awt/Container.java
(paramString): Implemented.
* javax/swing/AbstractButton.java
(paramString): Implemented.
* javax/swing/JComponent.java
(paramString): Implemented.
* javax/swing/JMenu.java
(paramString): Implemented.
* javax/swing/JMenuBar.java
(paramString): Implemented.
* javax/swing/JMenuItem.java
(paramString): Implemented.
* javax/swing/JPopupMenu.java
(paramString): Implemented.

Members: 
	libraries/javalib/java/awt/Container.java:1.28->1.29 
	libraries/javalib/javax/swing/AbstractButton.java:1.10->1.11 
	libraries/javalib/javax/swing/JComponent.java:1.12->1.13 
	libraries/javalib/javax/swing/JMenu.java:1.8->1.9 
	libraries/javalib/javax/swing/JMenuBar.java:1.6->1.7 
	libraries/javalib/javax/swing/JMenuItem.java:1.7->1.8 
	libraries/javalib/javax/swing/JPopupMenu.java:1.8->1.9 

Index: kaffe/libraries/javalib/java/awt/Container.java
diff -u kaffe/libraries/javalib/java/awt/Container.java:1.28 kaffe/libraries/javalib/java/awt/Container.java:1.29
--- kaffe/libraries/javalib/java/awt/Container.java:1.28	Sat Dec 11 23:08:40 2004
+++ kaffe/libraries/javalib/java/awt/Container.java	Sat Jan 29 15:39:55 2005
@@ -1,5 +1,5 @@
 /* Container.java -- parent container class in AWT
-   Copyright (C) 1999, 2000, 2002, 2003, 2004 Free Software Foundation
+   Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005  Free Software Foundation
 
 This file is part of GNU Classpath.
 
@@ -1052,11 +1052,14 @@
    */
   protected String paramString()
   {
-    String param = super.paramString();
     if (layoutMgr != null)
-      param = param + ",layout=" + layoutMgr.getClass().getName();
+      return super.paramString();
 
-    return param;
+    StringBuffer sb = new StringBuffer();
+    sb.append(super.paramString());
+    sb.append(",layout=");
+    sb.append(layoutMgr.getClass().getName());
+    return sb.toString();
   }
 
   /**
Index: kaffe/libraries/javalib/javax/swing/AbstractButton.java
diff -u kaffe/libraries/javalib/javax/swing/AbstractButton.java:1.10 kaffe/libraries/javalib/javax/swing/AbstractButton.java:1.11
--- kaffe/libraries/javalib/javax/swing/AbstractButton.java:1.10	Thu Jan 27 14:07:11 2005
+++ kaffe/libraries/javalib/javax/swing/AbstractButton.java	Sat Jan 29 15:39:57 2005
@@ -1847,7 +1847,39 @@
    */
   protected String paramString()
   {
-    return "AbstractButton";
+    StringBuffer sb = new StringBuffer();
+    sb.append(super.paramString());
+    sb.append(",defaultIcon=");
+    if (getIcon() != null)
+      sb.append(getIcon());
+    sb.append(",disabledIcon=");
+    if (getDisabledIcon() != null)
+      sb.append(getDisabledIcon());
+    sb.append(",disabledSelectedIcon=");
+    if (getDisabledSelectedIcon() != null)
+      sb.append(getDisabledSelectedIcon());
+    sb.append(",margin=");
+    if (getMargin() != null)
+      sb.append(getMargin());
+    sb.append(",paintBorder=").append(isBorderPainted());
+    sb.append(",paintFocus=").append(isFocusPainted());
+    sb.append(",pressedIcon=");
+    if (getPressedIcon() != null)
+      sb.append(getPressedIcon());
+    sb.append(",rolloverEnabled=").append(isRolloverEnabled());
+    sb.append(",rolloverIcon=");
+    if (getRolloverIcon() != null)
+      sb.append(getRolloverIcon());
+    sb.append(",rolloverSelected=");
+    if (getRolloverSelectedIcon() != null)
+      sb.append(getRolloverSelectedIcon());
+    sb.append(",selectedIcon=");
+    if (getSelectedIcon() != null)
+      sb.append(getSelectedIcon());
+    sb.append(",text=");
+    if (getText() != null)
+      sb.append(getText());
+    return sb.toString();
   }
 
   /**
Index: kaffe/libraries/javalib/javax/swing/JComponent.java
diff -u kaffe/libraries/javalib/javax/swing/JComponent.java:1.12 kaffe/libraries/javalib/javax/swing/JComponent.java:1.13
--- kaffe/libraries/javalib/javax/swing/JComponent.java:1.12	Sat Jan 29 14:35:29 2005
+++ kaffe/libraries/javalib/javax/swing/JComponent.java	Sat Jan 29 15:39:57 2005
@@ -1541,7 +1541,23 @@
    */
   protected String paramString()
   {
-    return "JComponent";
+    StringBuffer sb = new StringBuffer();
+    sb.append(super.paramString());
+    sb.append(",alignmentX=").append(getAlignmentX());
+    sb.append(",alignmentY=").append(getAlignmentY());
+    sb.append(",border=");
+    if (getBorder() != null)
+      sb.append(getBorder());
+    sb.append(",maximumSize=");
+    if (getMaximumSize() != null)
+      sb.append(getMaximumSize());
+    sb.append(",minimumSize=");
+    if (getMinimumSize() != null)
+      sb.append(getMinimumSize());
+    sb.append(",preferredSize=");
+    if (getPreferredSize() != null)
+      sb.append(getPreferredSize());
+    return sb.toString();
   }
 
   /**
Index: kaffe/libraries/javalib/javax/swing/JMenu.java
diff -u kaffe/libraries/javalib/javax/swing/JMenu.java:1.8 kaffe/libraries/javalib/javax/swing/JMenu.java:1.9
--- kaffe/libraries/javalib/javax/swing/JMenu.java:1.8	Sat Jan 29 15:36:10 2005
+++ kaffe/libraries/javalib/javax/swing/JMenu.java	Sat Jan 29 15:39:57 2005
@@ -59,11 +59,9 @@
 import javax.swing.plaf.MenuItemUI;
 
 /**
- * <p>
  * This class represents a menu that can be added to a menu bar or
  * can be a submenu in some other menu. When JMenu is selected it
  * displays JPopupMenu containing its menu items.
- * </p>
  *
  * <p>
  * JMenu's fires MenuEvents when this menu's selection changes. If this menu
@@ -71,7 +69,6 @@
  * deselected or cancelled, then fireMenuDeselectedEvent() or 
  * fireMenuCancelledEvent() is invoked, respectivelly.
  * </p>
- *
  */
 public class JMenu extends JMenuItem implements Accessible, MenuElement
 {
@@ -272,7 +269,6 @@
       throw new IllegalArgumentException("index less than zero");
 
     popupMenu.insert(item, index);
-
     return item;
   }
 
@@ -786,7 +782,7 @@
    */
   protected String paramString()
   {
-    return "JMenu";
+    return super.paramString();
   }
 
   public AccessibleContext getAccessibleContext()
Index: kaffe/libraries/javalib/javax/swing/JMenuBar.java
diff -u kaffe/libraries/javalib/javax/swing/JMenuBar.java:1.6 kaffe/libraries/javalib/javax/swing/JMenuBar.java:1.7
--- kaffe/libraries/javalib/javax/swing/JMenuBar.java:1.6	Thu Jan 27 14:07:11 2005
+++ kaffe/libraries/javalib/javax/swing/JMenuBar.java	Sat Jan 29 15:39:57 2005
@@ -313,7 +313,13 @@
    */
   protected String paramString()
   {
-    return "JMenuBar";
+    StringBuffer sb = new StringBuffer();
+    sb.append(super.paramString());
+    sb.append(",margin=");
+    if (getMargin() != null)
+      sb.append(getMargin());
+    sb.append(",paintBorder=").append(isBorderPainted());
+    return sb.toString();
   }
 
   /**
Index: kaffe/libraries/javalib/javax/swing/JMenuItem.java
diff -u kaffe/libraries/javalib/javax/swing/JMenuItem.java:1.7 kaffe/libraries/javalib/javax/swing/JMenuItem.java:1.8
--- kaffe/libraries/javalib/javax/swing/JMenuItem.java:1.7	Sat Jan 29 15:36:10 2005
+++ kaffe/libraries/javalib/javax/swing/JMenuItem.java	Sat Jan 29 15:39:57 2005
@@ -638,7 +638,7 @@
    */
   protected String paramString()
   {
-    return "JMenuItem";
+    return super.paramString();
   }
 
   public AccessibleContext getAccessibleContext()
Index: kaffe/libraries/javalib/javax/swing/JPopupMenu.java
diff -u kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.8 kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.9
--- kaffe/libraries/javalib/javax/swing/JPopupMenu.java:1.8	Sat Jan 29 15:36:10 2005
+++ kaffe/libraries/javalib/javax/swing/JPopupMenu.java	Sat Jan 29 15:40:00 2005
@@ -771,7 +771,17 @@
    */
   protected String paramString()
   {
-    return "JPopupMenu";
+    StringBuffer sb = new StringBuffer();
+    sb.append(super.paramString());
+    sb.append(",label=");
+    if (getLabel() != null)
+      sb.append(getLabel());
+    sb.append(",lightWeightPopupEnabled=").append(isLightWeightPopupEnabled());
+    sb.append(",margin=");
+    if (getMargin() != null)
+      sb.append(margin);
+    sb.append(",paintBorder=").append(isBorderPainted());
+    return sb.toString();
   }
 
   /**




More information about the kaffe mailing list