This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: [patch] Fix up Applet methods
- From: Thomas Fitzsimmons <fitzsim at redhat dot com>
- To: Jerry Quinn <jlquinn at optonline dot net>
- Cc: libgcj patches <java-patches at gcc dot gnu dot org>
- Date: Thu, 27 May 2004 15:53:19 -0400
- Subject: Re: [patch] Fix up Applet methods
- References: <16565.21134.260306.304445@localhost.localdomain>
On Wed, 2004-05-26 at 22:29, Jerry Quinn wrote:
> This fixes the API differences with jdk 1.4 in Applet.
>
> The old versions were deprecated and new versions copied from the old. Should
> the docs say @since 1.1?
>
I realized that we don't need Applet-specific versions of these size
methods. Applet viewer implementations can use AppletStub.appletResize
to set the size according to attributes in the APPLET tag.
I'm reverting on the java-gui-branch the patches that added
Applet-specific versions of preferredSize and minimumSize.
Tom
2004-05-27 Thomas Fitzsimmons <fitzsim@redhat.com>
* java/applet/Applet.java: Revert changes from 2004-04-29,
2004-03-15 and 2004-03-14.
Index: java/applet/Applet.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/applet/Applet.java,v
retrieving revision 1.3.36.4
diff -u -r1.3.36.4 Applet.java
--- java/applet/Applet.java 29 Apr 2004 17:31:58 -0000 1.3.36.4
+++ java/applet/Applet.java 27 May 2004 19:40:10 -0000
@@ -78,11 +78,6 @@
private transient AppletStub stub;
/**
- * The dimensions passed to this applet through its HTML tag.
- */
- private transient Dimension dimensions;
-
- /**
* The accessibility context for this applet.
*
* @serial the accessibleContext for this
@@ -462,41 +457,6 @@
s.defaultReadObject();
}
- private Dimension getDimensions ()
- {
- if (dimensions == null)
- {
- int width = Integer.parseInt(stub.getParameter("width"));
- int height = Integer.parseInt(stub.getParameter("height"));
-
- dimensions = new Dimension(width, height);
- }
-
- return dimensions;
- }
-
- /**
- * Returns an instance of {@link Dimension} representing the
- * applet's width and height parameters.
- *
- * @return the applet's preferred size
- */
- public Dimension preferredSize()
- {
- return stub == null ? super.preferredSize () : getDimensions ();
- }
-
- /**
- * Returns an instance of {@link Dimension} representing the
- * applet's width and height parameters.
- *
- * @return the applet's minimum size
- */
- public Dimension minimumSize()
- {
- return stub == null ? super.minimumSize () : getDimensions ();
- }
-
/**
* This class provides accessibility support for Applets, and is the
* runtime type returned by {@link #getAccessibleContext()}.