summaryrefslogtreecommitdiff
path: root/javax/swing
diff options
context:
space:
mode:
authorMichael Koch <konqueror@gmx.de>2005-01-28 12:12:53 +0000
committerMichael Koch <konqueror@gmx.de>2005-01-28 12:12:53 +0000
commitb64fde9daaab70b10beee96dedf703014ad304ee (patch)
tree79ab3b77990fee04a9a533359c2bc9b39c37718a /javax/swing
parent28e89675bf63101037a2e4fb9d2c39fdd59132a9 (diff)
downloadclasspath-b64fde9daaab70b10beee96dedf703014ad304ee.tar.gz
2005-01-28 Michael Koch <konqueror@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.
Diffstat (limited to 'javax/swing')
-rw-r--r--javax/swing/AbstractButton.java34
-rw-r--r--javax/swing/JComponent.java18
-rw-r--r--javax/swing/JMenu.java6
-rw-r--r--javax/swing/JMenuBar.java8
-rw-r--r--javax/swing/JMenuItem.java2
-rw-r--r--javax/swing/JPopupMenu.java12
6 files changed, 70 insertions, 10 deletions
diff --git a/javax/swing/AbstractButton.java b/javax/swing/AbstractButton.java
index 0d9dc1185..1232a4ab4 100644
--- a/javax/swing/AbstractButton.java
+++ b/javax/swing/AbstractButton.java
@@ -1847,7 +1847,39 @@ public abstract class AbstractButton extends JComponent
*/
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();
}
/**
diff --git a/javax/swing/JComponent.java b/javax/swing/JComponent.java
index 3faded56b..8f2bc9502 100644
--- a/javax/swing/JComponent.java
+++ b/javax/swing/JComponent.java
@@ -1541,7 +1541,23 @@ public abstract class JComponent extends Container implements Serializable
*/
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();
}
/**
diff --git a/javax/swing/JMenu.java b/javax/swing/JMenu.java
index 9a9289f0b..d9ad317a7 100644
--- a/javax/swing/JMenu.java
+++ b/javax/swing/JMenu.java
@@ -59,11 +59,9 @@ import javax.swing.event.MenuListener;
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 @@ import javax.swing.plaf.MenuItemUI;
* deselected or cancelled, then fireMenuDeselectedEvent() or
* fireMenuCancelledEvent() is invoked, respectivelly.
* </p>
- *
*/
public class JMenu extends JMenuItem implements Accessible, MenuElement
{
@@ -272,7 +269,6 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
throw new IllegalArgumentException("index less than zero");
popupMenu.insert(item, index);
-
return item;
}
@@ -786,7 +782,7 @@ public class JMenu extends JMenuItem implements Accessible, MenuElement
*/
protected String paramString()
{
- return "JMenu";
+ return super.paramString();
}
public AccessibleContext getAccessibleContext()
diff --git a/javax/swing/JMenuBar.java b/javax/swing/JMenuBar.java
index 11b134d64..e14c26270 100644
--- a/javax/swing/JMenuBar.java
+++ b/javax/swing/JMenuBar.java
@@ -313,7 +313,13 @@ public class JMenuBar extends JComponent implements Accessible, MenuElement
*/
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();
}
/**
diff --git a/javax/swing/JMenuItem.java b/javax/swing/JMenuItem.java
index aec4178d1..0ea38e0f7 100644
--- a/javax/swing/JMenuItem.java
+++ b/javax/swing/JMenuItem.java
@@ -638,7 +638,7 @@ public class JMenuItem extends AbstractButton implements Accessible,
*/
protected String paramString()
{
- return "JMenuItem";
+ return super.paramString();
}
public AccessibleContext getAccessibleContext()
diff --git a/javax/swing/JPopupMenu.java b/javax/swing/JPopupMenu.java
index b5b72db9d..ba358a310 100644
--- a/javax/swing/JPopupMenu.java
+++ b/javax/swing/JPopupMenu.java
@@ -771,7 +771,17 @@ public class JPopupMenu extends JComponent implements Accessible, MenuElement
*/
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();
}
/**