classpath-patches
[Top][All Lists]
Advanced

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

Re: [cp-patches] FYI: fixlet for JApplet, JDialog, JFrame, JWindow


From: Robert Schuster
Subject: Re: [cp-patches] FYI: fixlet for JApplet, JDialog, JFrame, JWindow
Date: Tue, 12 Jul 2005 20:52:45 +0200
User-agent: Mozilla/5.0 (X11; U; Linux i686; de-AT; rv:1.7.8) Gecko/20050514

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
is it documented why this special procedure is necessary? If not I would
like have such an explanation in the code.

cu
Robert

Anthony Balkissoon wrote:
> This is the same as Roman's JInternalFrame addImpl fixlet from
> yesterday.  Add to the top level container itself if we're in the
> initialization stage, otherwise add to its content pane.
> 
> Patch attached.
> 
> 2005-07-12  Anthony Balkissoon  <address@hidden>
> 
>       * javax/swing/JApplet.java,
>       * javax/swing/JDialog.java,
>       * javax/swing/JFrame.java,
>       * javax/swing/JWindow.java:
>       (addImpl): Add to the frame itself if we are in the init
>       stage, otherwise add to the contentPane.
> 
> -Tony
> 
> 
> ------------------------------------------------------------------------
> 
> Index: javax/swing/JApplet.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/javax/swing/JApplet.java,v
> retrieving revision 1.17
> diff -u -r1.17 JApplet.java
> --- javax/swing/JApplet.java  2 Jul 2005 20:32:47 -0000       1.17
> +++ javax/swing/JApplet.java  12 Jul 2005 13:44:41 -0000
> @@ -148,9 +148,9 @@
>  
>    protected void addImpl(Component comp, Object constraints, int index)
>    {
> -    // If we're adding the rootPane (initialization stages) use super.add.
> +    // If we're adding in the initialization stage use super.add.
>      // Otherwise pass the add onto the content pane.
> -    if (comp == rootPane)
> +    if (!initStageDone)
>        super.addImpl(comp, constraints, index);
>      else
>        {
> Index: javax/swing/JDialog.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/javax/swing/JDialog.java,v
> retrieving revision 1.15
> diff -u -r1.15 JDialog.java
> --- javax/swing/JDialog.java  2 Jul 2005 20:32:47 -0000       1.15
> +++ javax/swing/JDialog.java  12 Jul 2005 13:44:41 -0000
> @@ -438,9 +438,9 @@
>     */
>    protected void addImpl(Component comp, Object constraints, int index)
>    {
> -    // If we're adding the rootPane (initialization stages) use super.add.
> +    // If we're adding in the initialization stage use super.add.
>      // Otherwise pass the add onto the content pane.
> -    if (comp == rootPane)
> +    if (!initStageDone)
>        super.addImpl(comp, constraints, index);
>      else
>        {
> Index: javax/swing/JFrame.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/javax/swing/JFrame.java,v
> retrieving revision 1.25
> diff -u -r1.25 JFrame.java
> --- javax/swing/JFrame.java   2 Jul 2005 20:32:47 -0000       1.25
> +++ javax/swing/JFrame.java   12 Jul 2005 13:44:41 -0000
> @@ -214,9 +214,9 @@
>  
>    protected void addImpl(Component comp, Object constraints, int index)
>    {
> -    // If we're adding the rootPane (initialization stages) use super.add.
> +    // If we're adding in the initialization stage use super.add.
>      // Otherwise pass the add onto the content pane.
> -    if (comp==rootPane)
> +    if (!initStageDone)
>        super.addImpl(comp, constraints, index);
>      else
>        {
> Index: javax/swing/JWindow.java
> ===================================================================
> RCS file: /cvsroot/classpath/classpath/javax/swing/JWindow.java,v
> retrieving revision 1.19
> diff -u -r1.19 JWindow.java
> --- javax/swing/JWindow.java  2 Jul 2005 20:32:49 -0000       1.19
> +++ javax/swing/JWindow.java  12 Jul 2005 13:44:41 -0000
> @@ -190,9 +190,9 @@
>  
>    protected void addImpl(Component comp, Object constraints, int index)
>    {
> -    // If we're adding the rootPane (initialization stages) use super.add.
> +    // If we're adding in the initialization stage use super.add.
>      // otherwise pass the add onto the content pane.
> -    if (comp == rootPane)
> +    if (!initStageDone)
>        super.addImpl(comp, constraints, index);
>      else
>        {
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> Classpath-patches mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/classpath-patches
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFC1BF9G9cfwmwwEtoRAq0BAJ9OnOWgMuFNhNOniq9hMjDJ4lFcigCdGgpC
SmJg9+tmRf3CrTw3lk3TU+U=
=2xU9
-----END PGP SIGNATURE-----




reply via email to

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