Index: ChangeLog =================================================================== RCS file: /cvsroot/classpath/classpath/ChangeLog,v retrieving revision 1.2386.2.70 diff -u -3 -p -u -r1.2386.2.70 ChangeLog --- ChangeLog 28 Jan 2005 10:43:55 -0000 1.2386.2.70 +++ ChangeLog 29 Jan 2005 02:41:14 -0000 @@ -1,3 +1,80 @@ +2005-01-29 Ito Kazumitsu
+ + * java/text/SimpleDateFormat.java: + (parse): Set the DST offset to 0 when parsing + GMT offset timezones. + +2005-01-28 Chris Burdess + + * gnu/xml/DomNode: Correct implementation of getElementsByTagName + etc to return a NodeList that returns consistent results from item + and getLength methods. + +2005-01-28 Mark Wielaard + + * java/util/jar/Attributes.java (Attributes.Name): Add documentation + to describe attributes without a constant field value in this class. + +2005-01-28 Michael Koch + + * javax/swing/SwingUtilities.java + (getFontMetrics): Removed. + +2005-01-28 Michael Koch + + * 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. + +2005-01-28 Michael Koch + + * javax/swing/JMenu.java + (uiClassID): Removed. + (JMenu): Set invoker on popup menu. + (getUIClassID): Return id directly. + (getItemCount): Simply return getMenuComponentCount(). + Fixed javadoc. + (isTopLevelMenu): Simplified. + * javax/swing/JMenuItem.java + (uiClassID): Removed. + (getUIClassID): Return id directly. + * javax/swing/JPopupMenu.java + (uiClassID): Removed. + (JPopupMenu): Always initialize correctly. + (getSubElements): Only return components implementing MenuElement + interface. + (HeavyWeightPopup.hide): Removed. + +2005-01-28 Michael Koch + + * java/util/jar/Attributes.java + (CREATED_BY, JAVA_BEAN, MAGIC): Removed. + +2005-01-28 Michael Koch + + * java/awt/image/ReplicateScaleFilter.java + (replicatePixels): Made private. + * javax/swing/colorchooser/DefaultRGBChooserPanel.java + (DefaultRGBChooserPanel): Made package private. + * javax/swing/colorchooser/DefaultSwatchChooserPanel.java + (RecentSwatchPanel): Likewise. + * javax/swing/event/MouseInputAdapter.java: Reformatted. + (MouseInputAdapter): Made abstract. + * javax/swing/tree/DefaultMutableTreeNode.java + (random): Removed. + (growTree): Likewise. + 2005-01-27 Michael Koch * java/util/GregorianCalendar.java (getLeniarDay): Index: gnu/xml/dom/DomNode.java =================================================================== RCS file: /cvsroot/classpath/classpath/gnu/xml/dom/DomNode.java,v retrieving revision 1.1.2.1 diff -u -3 -p -u -r1.1.2.1 DomNode.java --- gnu/xml/dom/DomNode.java 16 Jan 2005 15:15:10 -0000 1.1.2.1 +++ gnu/xml/dom/DomNode.java 29 Jan 2005 02:41:15 -0000 @@ -1347,13 +1347,17 @@ public abstract class DomNode current.previousNode (); lastIndex--; } - return current.previousNode (); + Node ret = current.previousNode (); + current = null; + return ret; } // somewhere after last node while (++lastIndex != index) current.nextNode (); - return current.nextNode (); + Node ret = current.nextNode (); + current = null; + return ret; } public int getLength() @@ -1365,6 +1369,7 @@ public abstract class DomNode { retval++; } + current = null; return retval; } Index: java/awt/Container.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/Container.java,v retrieving revision 1.37.2.6 diff -u -3 -p -u -r1.37.2.6 Container.java --- java/awt/Container.java 16 Jan 2005 15:15:11 -0000 1.37.2.6 +++ java/awt/Container.java 29 Jan 2005 02:41:15 -0000 @@ -1,5 +1,6 @@ /* Container.java -- parent container class in AWT - Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 Free Software Foundation + Copyright (C) 1999, 2000, 2002, 2003, 2004, 2005 + Free Software Foundation This file is part of GNU Classpath. @@ -1053,11 +1054,14 @@ public class Container extends Component */ 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: java/awt/image/ReplicateScaleFilter.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/awt/image/ReplicateScaleFilter.java,v retrieving revision 1.6 diff -u -3 -p -u -r1.6 ReplicateScaleFilter.java --- java/awt/image/ReplicateScaleFilter.java 31 May 2004 21:11:48 -0000 1.6 +++ java/awt/image/ReplicateScaleFilter.java 29 Jan 2005 02:41:15 -0000 @@ -201,10 +201,10 @@ public class ReplicateScaleFilter extend model, destPixels, 0, destScansize); } - protected byte[] replicatePixels(int srcx, int srcy, int srcw, int srch, - ColorModel model, byte[] srcPixels, - int srcOffset, int srcScansize, - double rx, double ry, int destScansize) + private byte[] replicatePixels(int srcx, int srcy, int srcw, int srch, + ColorModel model, byte[] srcPixels, + int srcOffset, int srcScansize, + double rx, double ry, int destScansize) { byte[] destPixels = new byte[(int) Math.ceil(srcw/rx) * (int) Math.ceil(srch/ry)]; @@ -221,10 +221,10 @@ public class ReplicateScaleFilter extend return destPixels; } - protected int[] replicatePixels(int srcx, int srcy, int srcw, int srch, - ColorModel model, int[] srcPixels, - int srcOffset, int srcScansize, - double rx, double ry, int destScansize) + private int[] replicatePixels(int srcx, int srcy, int srcw, int srch, + ColorModel model, int[] srcPixels, + int srcOffset, int srcScansize, + double rx, double ry, int destScansize) { int[] destPixels = new int[(int) Math.ceil(srcw/rx) * (int) Math.ceil(srch/ry)]; Index: java/text/SimpleDateFormat.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/text/SimpleDateFormat.java,v retrieving revision 1.28.2.5 diff -u -3 -p -u -r1.28.2.5 SimpleDateFormat.java --- java/text/SimpleDateFormat.java 26 Jan 2005 02:30:49 -0000 1.28.2.5 +++ java/text/SimpleDateFormat.java 29 Jan 2005 02:41:16 -0000 @@ -850,6 +850,7 @@ public class SimpleDateFormat extends Da { found_zone = true; saw_timezone = true; + calendar.set(Calendar.DST_OFFSET, 0); offset = simpleOffset.intValue(); } else Index: java/util/jar/Attributes.java =================================================================== RCS file: /cvsroot/classpath/classpath/java/util/jar/Attributes.java,v retrieving revision 1.9 diff -u -3 -p -u -r1.9 Attributes.java --- java/util/jar/Attributes.java 17 Apr 2004 19:23:19 -0000 1.9 +++ java/util/jar/Attributes.java 29 Jan 2005 02:41:16 -0000 @@ -1,5 +1,5 @@ /* Attributes.java -- Represents attribute name/value pairs from a Manifest - Copyright (C) 2000, 2002 Free Software Foundation, Inc. + Copyright (C) 2000, 2002, 2005 Free Software Foundation, Inc. This file is part of GNU Classpath. @@ -98,14 +98,23 @@ public class Attributes implements Clone * converted to lowercase. But you can get the original case sensitive * string with thetoString()
method.
*
+ * Most important attributes have a constant defined in this + * class. Some other attributes used in Manifest files are: + *
EXTENSTION_NAME
.
@@ -171,48 +178,56 @@ public class Attributes implements Clone
public static final Name EXTENSION_INSTALLATION = EXTENSION_NAME;
// Package versioning and sealing attributes
+
/**
* Package versioning -
* name of extension library contained in this jar.
*/
public static final Name IMPLEMENTATION_TITLE
= new Name("Implementation-Title");
+
/**
* Package versioning -
* version of the extension library contained in this jar.
*/
public static final Name IMPLEMENTATION_VERSION
= new Name("Implementation-Version");
+
/**
* Package versioning -
* name of extension library creator contained in this jar.
*/
public static final Name IMPLEMENTATION_VENDOR
= new Name("Implementation-Vendor");
+
/**
* Package versioning -
* unique id of extension library creator.
*/
public static final Name IMPLEMENTATION_VENDOR_ID
= new Name("Implementation-Vendor-Id");
+
/**
* Package versioning -
* location where this implementation can be downloaded.
*/
public static final Name IMPLEMENTATION_URL
= new Name("Implementation-URL");
+
/**
* Package versioning -
* title of the specification contained in this jar.
*/
public static final Name SPECIFICATION_TITLE
= new Name("Specification-Title");
+
/**
* Package versioning -
* version of the specification contained in this jar.
*/
public static final Name SPECIFICATION_VERSION
= new Name("Specification-Version");
+
/**
* Package versioning -
* organisation that maintains the specification contains in this
@@ -220,6 +235,7 @@ public class Attributes implements Clone
*/
public static final Name SPECIFICATION_VENDOR
= new Name("Specification-Vendor");
+
/**
* Package sealing -
* whether (all) package(s) is(/are) sealed. Value is either "true"
@@ -233,21 +249,9 @@ public class Attributes implements Clone
*/
public static final Name CONTENT_TYPE = new Name("Content-Type");
- /**
- * Bean objects attribute -
- * whether the entry is a Java Bean. Value is either "true" or "false".
- */
- public static final Name JAVA_BEAN = new Name("Java-Bean");
-
- /**
- * Signing attribute -
- * application specific signing attribute. Must be understood by
- * the manifest parser when present to validate the jar (entry).
- */
- public static final Name MAGIC = new Name("Magic");
-
/** The (lowercase) String representation of this Name */
private final String name;
+
/** The original String given to the constructor */
private final String origName;
Index: javax/swing/AbstractButton.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/AbstractButton.java,v
retrieving revision 1.17.2.5
diff -u -3 -p -u -r1.17.2.5 AbstractButton.java
--- javax/swing/AbstractButton.java 27 Jan 2005 09:45:34 -0000 1.17.2.5
+++ javax/swing/AbstractButton.java 29 Jan 2005 02:41:17 -0000
@@ -1847,7 +1847,39 @@ public abstract class AbstractButton ext
*/
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: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.20.2.6
diff -u -3 -p -u -r1.20.2.6 JComponent.java
--- javax/swing/JComponent.java 28 Jan 2005 10:43:57 -0000 1.20.2.6
+++ javax/swing/JComponent.java 29 Jan 2005 02:41:17 -0000
@@ -1541,7 +1541,23 @@ public abstract class JComponent extends
*/
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: javax/swing/JMenu.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JMenu.java,v
retrieving revision 1.8.2.3
diff -u -3 -p -u -r1.8.2.3 JMenu.java
--- javax/swing/JMenu.java 16 Jan 2005 15:15:13 -0000 1.8.2.3
+++ javax/swing/JMenu.java 29 Jan 2005 02:41:18 -0000
@@ -1,5 +1,5 @@
/* JMenu.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -59,11 +59,9 @@ import javax.swing.event.MenuListener;
import javax.swing.plaf.MenuItemUI;
/**
- * * 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. - *
* ** JMenu's fires MenuEvents when this menu's selection changes. If this menu @@ -71,15 +69,11 @@ import javax.swing.plaf.MenuItemUI; * deselected or cancelled, then fireMenuDeselectedEvent() or * fireMenuCancelledEvent() is invoked, respectivelly. *
- * */ public class JMenu extends JMenuItem implements Accessible, MenuElement { private static final long serialVersionUID = 4227225638931828014L; - /** name for the UI delegate for this menu. */ - private static final String uiClassID = "MenuUI"; - /** A Popup menu associated with this menu, which pops up when menu is selected */ private JPopupMenu popupMenu = new JPopupMenu(); @@ -107,30 +101,32 @@ public class JMenu extends JMenuItem imp } /** - * Creates a new JMenu with the spicified label + * Creates a newJMenu
with the specified label.
*
* @param text label for this menu
*/
public JMenu(String text)
{
super(text);
+ popupMenu.setInvoker(this);
}
/**
- * Creates a new JMenu object
+ * Creates a new JMenu
object.
*
- * @param action Action that is used to create menu item tha will be
+ * @param action Action that is used to create menu item tha will be
* added to the menu.
*/
public JMenu(Action action)
{
super(action);
createActionChangeListener(this);
+ popupMenu.setInvoker(this);
}
/**
- * Creates a new JMenu with specified label and an option
- * for this menu to be tear-off menu
+ * Creates a new JMenu
with specified label and an option
+ * for this menu to be tear-off menu.
*
* @param text label for this menu
* @param tearoff true if this menu should be tear-off and false otherwise
@@ -273,7 +269,6 @@ public class JMenu extends JMenuItem imp
throw new IllegalArgumentException("index less than zero");
popupMenu.insert(item, index);
-
return item;
}
@@ -312,7 +307,7 @@ public class JMenu extends JMenuItem imp
*/
public String getUIClassID()
{
- return uiClassID;
+ return "MenuUI";
}
/**
@@ -388,8 +383,8 @@ public class JMenu extends JMenuItem imp
/**
* Checks if PopupMenu associated with this menu is visible
*
- * @return true if the popup associated with this menu is currently visible on the screen and
- * false otherwise.
+ * @return true if the popup associated with this menu is currently visible
+ * on the screen and false otherwise.
*/
public boolean isPopupMenuVisible()
{
@@ -528,15 +523,15 @@ public class JMenu extends JMenuItem imp
}
/**
- * Returns number of items in the menu
+ * Returns number of items in the menu including separators.
*
* @return number of items in the menu
+ *
+ * @see #getMenuComponentCount()
*/
public int getItemCount()
{
- // returns the number of items on
- // the menu, including separators.
- return getComponents().length;
+ return getMenuComponentCount();
}
/**
@@ -592,10 +587,7 @@ public class JMenu extends JMenuItem imp
*/
public boolean isTopLevelMenu()
{
- if (getParent() instanceof JMenuBar)
- return true;
- else
- return false;
+ return getParent() instanceof JMenuBar;
}
/**
@@ -790,7 +782,7 @@ public class JMenu extends JMenuItem imp
*/
protected String paramString()
{
- return "JMenu";
+ return super.paramString();
}
public AccessibleContext getAccessibleContext()
Index: javax/swing/JMenuBar.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JMenuBar.java,v
retrieving revision 1.9.2.2
diff -u -3 -p -u -r1.9.2.2 JMenuBar.java
--- javax/swing/JMenuBar.java 27 Jan 2005 09:45:34 -0000 1.9.2.2
+++ javax/swing/JMenuBar.java 29 Jan 2005 02:41:18 -0000
@@ -313,7 +313,13 @@ public class JMenuBar extends JComponent
*/
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: javax/swing/JMenuItem.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JMenuItem.java,v
retrieving revision 1.10.2.3
diff -u -3 -p -u -r1.10.2.3 JMenuItem.java
--- javax/swing/JMenuItem.java 16 Jan 2005 02:14:49 -0000 1.10.2.3
+++ javax/swing/JMenuItem.java 29 Jan 2005 02:41:18 -0000
@@ -1,5 +1,5 @@
/* JMenuItem.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -60,9 +60,7 @@ import javax.swing.event.MenuKeyEvent;
import javax.swing.event.MenuKeyListener;
import javax.swing.plaf.MenuItemUI;
-
/**
- * * JMenuItem represents element in the menu. It inherits most of * its functionality from AbstractButton, however its behavior somewhat * varies from it. JMenuItem fire different kinds of events. @@ -71,16 +69,12 @@ import javax.swing.plaf.MenuItemUI; * fired when menu item is selected. In addition to this events menuItem also * fire MenuDragMouseEvent and MenuKeyEvents when mouse is dragged over * the menu item or associated key with menu item is invoked respectively. - *
*/ public class JMenuItem extends AbstractButton implements Accessible, MenuElement { private static final long serialVersionUID = -1681004643499461044L; - /** name for the UI delegate for this menuItem. */ - private static final String uiClassID = "MenuItemUI"; - /** Combination of keyboard keys that can be used to activate this menu item */ private KeyStroke accelerator; @@ -212,7 +206,7 @@ public class JMenuItem extends AbstractB */ public String getUIClassID() { - return uiClassID; + return "MenuItemUI"; } /** @@ -644,7 +638,7 @@ public class JMenuItem extends AbstractB */ protected String paramString() { - return "JMenuItem"; + return super.paramString(); } public AccessibleContext getAccessibleContext() Index: javax/swing/JPopupMenu.java =================================================================== RCS file: /cvsroot/classpath/classpath/javax/swing/JPopupMenu.java,v retrieving revision 1.8.2.4 diff -u -3 -p -u -r1.8.2.4 JPopupMenu.java --- javax/swing/JPopupMenu.java 27 Jan 2005 09:45:34 -0000 1.8.2.4 +++ javax/swing/JPopupMenu.java 29 Jan 2005 02:41:18 -0000 @@ -53,6 +53,7 @@ import java.beans.PropertyChangeListener import java.io.IOException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; +import java.util.ArrayList; import java.util.EventListener; import javax.accessibility.Accessible; @@ -92,9 +93,6 @@ public class JPopupMenu extends JCompone { private static final long serialVersionUID = -8336996630009646009L; - /** name for the UI delegate for this menuItem. */ - private static final String uiClassID = "PopupMenuUI"; - /* indicates if popup's menu border should be painted*/ private boolean borderPainted = true; @@ -144,11 +142,7 @@ public class JPopupMenu extends JCompone */ public JPopupMenu() { - updateUI(); - - lightWeightPopupEnabled = DefaultLightWeightPopupEnabled; - selectionModel = new DefaultSingleSelectionModel(); - super.setVisible(false); + this(null); } /** @@ -158,7 +152,11 @@ public class JPopupMenu extends JCompone */ public JPopupMenu(String label) { + lightWeightPopupEnabled = getDefaultLightWeightPopupEnabled(); setLabel(label); + setSelectionModel(new DefaultSingleSelectionModel()); + super.setVisible(false); + updateUI(); } private void readObject(ObjectInputStream stream) @@ -773,7 +771,17 @@ public class JPopupMenu extends JCompone */ 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(); } /** @@ -821,19 +829,22 @@ public class JPopupMenu extends JCompone } /** - * Return subcomonents of this popup menu. + * Return subcomonents of this popup menu. This method returns only + * components that implement theMenuElement
interface.
*
- * @return Array containing menuItem's of belonging to this popup menu.
+ * @return array of menu items belonging to this popup menu
*/
public MenuElement[] getSubElements()
{
Component[] items = getComponents();
- MenuElement[] subElements = new MenuElement[items.length];
+ ArrayList subElements = new ArrayList();
for (int i = 0; i < items.length; i++)
- subElements[i] = (MenuElement) items[i];
+ if (items[i] instanceof MenuElement)
+ subElements.add(items[i]);
- return subElements;
+ return (MenuElement[])
+ subElements.toArray(new MenuElement[subElements.size()]);
}
/**
@@ -1020,14 +1031,6 @@ public class JPopupMenu extends JCompone
this.setBounds(x, y, width, height);
this.show();
}
-
- /**
- * Hides JWindow with menu item's from the screen.
- */
- public void hide()
- {
- super.hide();
- }
}
/**
Index: javax/swing/SwingUtilities.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/SwingUtilities.java,v
retrieving revision 1.15.2.5
diff -u -3 -p -u -r1.15.2.5 SwingUtilities.java
--- javax/swing/SwingUtilities.java 27 Jan 2005 09:45:35 -0000 1.15.2.5
+++ javax/swing/SwingUtilities.java 29 Jan 2005 02:41:18 -0000
@@ -295,22 +295,6 @@ public class SwingUtilities
}
/**
- * Returns the font metrics object for a given font. The metrics can be
- * used to calculate crude bounding boxes and positioning information,
- * for laying out components with textual elements.
- *
- * @param font The font to get metrics for
- *
- * @return The font's metrics
- *
- * @see java.awt.font.GlyphMetrics
- */
- public static FontMetrics getFontMetrics(Font font)
- {
- return Toolkit.getDefaultToolkit().getFontMetrics(font);
- }
-
- /**
* If comp
is a RootPaneContainer, return its JRootPane.
* Otherwise call getAncestorOfClass(JRootPane.class, a)
.
*
Index: javax/swing/colorchooser/DefaultRGBChooserPanel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/DefaultRGBChooserPanel.java,v
retrieving revision 1.3.2.2
diff -u -3 -p -u -r1.3.2.2 DefaultRGBChooserPanel.java
--- javax/swing/colorchooser/DefaultRGBChooserPanel.java 15 Jan 2005 17:02:21 -0000 1.3.2.2
+++ javax/swing/colorchooser/DefaultRGBChooserPanel.java 29 Jan 2005 02:41:18 -0000
@@ -1,5 +1,5 @@
/* DefaultRGHChooserPanel.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -57,7 +57,7 @@ import javax.swing.event.ChangeListener;
* This is the default RGB panel for the JColorChooser. The color is selected
* using three sliders that represent the RGB values.
*/
-public class DefaultRGBChooserPanel extends AbstractColorChooserPanel
+class DefaultRGBChooserPanel extends AbstractColorChooserPanel
{
/**
* This class handles the slider value changes for all three sliders.
Index: javax/swing/colorchooser/DefaultSwatchChooserPanel.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/colorchooser/DefaultSwatchChooserPanel.java,v
retrieving revision 1.2.2.2
diff -u -3 -p -u -r1.2.2.2 DefaultSwatchChooserPanel.java
--- javax/swing/colorchooser/DefaultSwatchChooserPanel.java 15 Jan 2005 17:02:21 -0000 1.2.2.2
+++ javax/swing/colorchooser/DefaultSwatchChooserPanel.java 29 Jan 2005 02:41:18 -0000
@@ -1,5 +1,5 @@
/* DefaultSwatchChooserPanel.java --
- Copyright (C) 2004 Free Software Foundation, Inc.
+ Copyright (C) 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -432,7 +432,7 @@ class DefaultSwatchChooserPanel extends
/**
* This class is the recent swatch panel. It holds recently selected colors.
*/
- public static class RecentSwatchPanel extends SwatchPanel
+ static class RecentSwatchPanel extends SwatchPanel
{
/** The array for storing recently stored colors. */
Color[] colors;
Index: javax/swing/event/MouseInputAdapter.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/event/MouseInputAdapter.java,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 MouseInputAdapter.java
--- javax/swing/event/MouseInputAdapter.java 8 Jun 2003 12:14:56 -0000 1.2
+++ javax/swing/event/MouseInputAdapter.java 29 Jan 2005 02:41:18 -0000
@@ -1,5 +1,5 @@
/* MouseInputAdapter.java --
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -44,72 +44,76 @@ import java.awt.event.MouseEvent;
* MouseInputAdapter
* @author Andrew Selkirk
*/
-public class MouseInputAdapter extends Object
- implements MouseInputListener {
-
- //-------------------------------------------------------------
- // Initialization ---------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Constructor MouseInputAdapter
- */
- public MouseInputAdapter() {
- } // MouseInputAdapter()
-
-
- //-------------------------------------------------------------
- // Methods ----------------------------------------------------
- //-------------------------------------------------------------
-
- /**
- * Mouse clicked
- * @param event Mouse event
- */
- public void mouseClicked(MouseEvent event) {
- } // mouseClicked()
-
- /**
- * Mouse dragged
- * @param event Mouse event
- */
- public void mouseDragged(MouseEvent event) {
- } // mouseDragged()
-
- /**
- * Mouse entered
- * @param event Mouse event
- */
- public void mouseEntered(MouseEvent event) {
- } // mouseEntered()
-
- /**
- * Mouse exited
- * @param event Mouse event
- */
- public void mouseExited(MouseEvent event) {
- } // mouseExited()
-
- /**
- * Mouse moved
- * @param event Mouse event
- */
- public void mouseMoved(MouseEvent event) {
- } // mouseMoved()
-
- /**
- * Mouse pressed
- * @param event Mouse event
- */
- public void mousePressed(MouseEvent event) {
- } // mousePressed()
-
- /**
- * Mouse released
- * @param event Mouse event
- */
- public void mouseReleased(MouseEvent event) {
- } // mouseReleased()
-
-
-} // MouseInputAdapterEvent
+public abstract class MouseInputAdapter implements MouseInputListener
+{
+ /**
+ * Constructor MouseInputAdapter
+ */
+ public MouseInputAdapter()
+ {
+ // Do nothing here.
+ }
+
+ /**
+ * Mouse clicked
+ * @param event Mouse event
+ */
+ public void mouseClicked(MouseEvent event)
+ {
+ // Do nothing by default.
+ }
+
+ /**
+ * Mouse dragged
+ * @param event Mouse event
+ */
+ public void mouseDragged(MouseEvent event)
+ {
+ // Do nothing by default.
+ }
+
+ /**
+ * Mouse entered
+ * @param event Mouse event
+ */
+ public void mouseEntered(MouseEvent event)
+ {
+ // Do nothing by default.
+ }
+
+ /**
+ * Mouse exited
+ * @param event Mouse event
+ */
+ public void mouseExited(MouseEvent event)
+ {
+ // Do nothing by default.
+ }
+
+ /**
+ * Mouse moved
+ * @param event Mouse event
+ */
+ public void mouseMoved(MouseEvent event)
+ {
+ // Do nothing by default.
+ }
+
+ /**
+ * Mouse pressed
+ * @param event Mouse event
+ */
+ public void mousePressed(MouseEvent event)
+ {
+ // Do nothing by default.
+ }
+
+ /**
+ * Mouse released
+ * @param event Mouse event
+ */
+ public void mouseReleased(MouseEvent event)
+ {
+ // Do nothing by default.
+ }
+}
Index: javax/swing/tree/DefaultMutableTreeNode.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/tree/DefaultMutableTreeNode.java,v
retrieving revision 1.5.2.1
diff -u -3 -p -u -r1.5.2.1 DefaultMutableTreeNode.java
--- javax/swing/tree/DefaultMutableTreeNode.java 16 Jan 2005 15:15:13 -0000 1.5.2.1
+++ javax/swing/tree/DefaultMutableTreeNode.java 29 Jan 2005 02:41:19 -0000
@@ -1,5 +1,5 @@
/* DefaultMutableTreeNode.java --
- Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2004, 2005 Free Software Foundation, Inc.
This file is part of GNU Classpath.
@@ -502,33 +502,6 @@ public class DefaultMutableTreeNode
return depth;
}
- static Random random = new Random(System.currentTimeMillis());
-
- public static void growTree(DefaultMutableTreeNode root)
- {
- DefaultMutableTreeNode node;
-
- DefaultMutableTreeNode current = root;
- int index = 0;
-
- do
- {
- if (random.nextBoolean())
- {
- node = new DefaultMutableTreeNode(String.valueOf(index));
- index++;
- current.add(node);
- current = node;
- }
- else
- {
- current = (DefaultMutableTreeNode) current.getParent();
- }
- }
- while (current != root
- && current != null);
- }
-
/**
* getLevel
*