commit-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch: javax.swing - import clean ups


From: Mark Wielaard
Subject: Re: Patch: javax.swing - import clean ups
Date: Sun, 02 May 2004 12:22:27 +0200

Hi,

On Thu, 2004-04-29 at 09:02, Michael Koch wrote:
> I just commited the attached patch to fix the import statements all over 
> Swing.
>
> 2004-04-29  Michael Koch  <address@hidden>
> 
>       * javax/swing/AbstractButton.java,
>       javax/swing/ActionMap.java,
>       javax/swing/DefaultButtonModel.java,
>    [...]
>       javax/swing/text/StyledEditorKit.java,
>       javax/swing/tree/DefaultTreeCellEditor.java:
>       Clean ip imports.

But there were also some code changes in this.
I am reverting those now since they cause all Swing applications to stop
working with classpath-0.09-pre2. Which is a very bad regression.

> diff -u -r1.14 JComponent.java
> --- javax/swing/JComponent.java 17 Apr 2004 23:24:46 -0000      1.14
> +++ javax/swing/JComponent.java 29 Apr 2004 06:59:16 -0000
> [...]
> @@ -946,7 +943,7 @@
>         public void reshape(int x, int y, int w, int h)
>         {
>                 ///      Moves and resizes this component.
> -               super.reshape(x,y,w,h);
> +               setBounds(x,y,w,h);
>         }
>  
> 

> diff -u -r1.4 ViewportLayout.java
> --- javax/swing/ViewportLayout.java     19 Mar 2004 21:22:24
> -0000      1.4
> +++ javax/swing/ViewportLayout.java     29 Apr 2004 06:59:18 -0000
> @@ -67,7 +67,7 @@
>            return null;
>         }
>         public void layoutContainer(Container parent) {
> -          if (parent.countComponents() == 1)
> +          if (parent.getComponentCount() == 1)
>              {
>                // This should usually be true, but if it's not it is
>                // probably nicer if we do not panic.

I am committing the following patch for this:

2004-05-02  Mark Wielaard  <address@hidden>

        Reverting bad commit from 2004-04-29
        * javax/swing/JComponent.java (reshape): Call super.reshape().
        * javax/swing/ViewportLayout.java (layoutContainer): Call
        parent.countComponents().

Please. If you hack on anything Swing (even if you think it is just
something minor like this) install Graydon his Test Swing application to
check any changes. See http://people.redhat.com/~graydon/testswing.java
Just like you should always run Mauve tests before committing any
change. And the Wonka Visual Test Engine from Mauve when you hack on
anything that might impact AWT.

Thanks,

Mark
Index: javax/swing/JComponent.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/JComponent.java,v
retrieving revision 1.15
diff -u -r1.15 JComponent.java
--- javax/swing/JComponent.java 29 Apr 2004 07:00:34 -0000      1.15
+++ javax/swing/JComponent.java 2 May 2004 10:15:15 -0000
@@ -943,7 +943,7 @@
        public void reshape(int x, int y, int w, int h)
        {
                ///      Moves and resizes this component.
-               setBounds(x,y,w,h);
+               super.reshape(x,y,w,h);
        }
 
        public void revalidate()
Index: javax/swing/ViewportLayout.java
===================================================================
RCS file: /cvsroot/classpath/classpath/javax/swing/ViewportLayout.java,v
retrieving revision 1.5
diff -u -r1.5 ViewportLayout.java
--- javax/swing/ViewportLayout.java     29 Apr 2004 07:00:34 -0000      1.5
+++ javax/swing/ViewportLayout.java     2 May 2004 10:15:15 -0000
@@ -67,7 +67,7 @@
           return null;
        }
        public void layoutContainer(Container parent) {
-          if (parent.getComponentCount() == 1)
+          if (parent.countComponents() == 1)
             {
               // This should usually be true, but if it's not it is
               // probably nicer if we do not panic.

Attachment: signature.asc
Description: This is a digitally signed message part


reply via email to

[Prev in Thread] Current Thread [Next in Thread]