This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch] Fix up Applet methods


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?

2004-05-26  Jerry Quinn  <jlquinn@us.ibm.com>

	* java/applet/Applet.java (minimumSize, preferredSize): Deprecate.
	(getMinimumSize, getPreferredSize): New.
	

cvs diff: Diffing java/applet
Index: java/applet/Applet.java
===================================================================
RCS file: /cvs/gcc/gcc/libjava/java/applet/Applet.java,v
retrieving revision 1.4
diff -u -w -r1.4 Applet.java
--- java/applet/Applet.java     16 Apr 2004 18:44:42 -0000      1.4
+++ java/applet/Applet.java     27 May 2004 02:25:44 -0000
@@ -480,6 +480,9 @@
    * applet's width and height parameters.
    *
    * @return the applet's preferred size
+   *
+   * @deprecated This method is deprecated in favor of
+   *<code>getPreferredSize()</code>.
    */
   public Dimension preferredSize()
   {
@@ -490,7 +493,21 @@
    * Returns an instance of {@link Dimension} representing the
    * applet's width and height parameters.
    *
+   * @return the applet's preferred size
+   */
+  public Dimension getPreferredSize()
+  {
+    return getDimensions ();
+  }
+
+  /**
+   * Returns an instance of {@link Dimension} representing the
+   * applet's width and height parameters.
+   *
    * @return the applet's minimum size
+   *
+   * @deprecated This method is deprecated in favor of
+   *<code>getMinimumSize()</code>.
    */
   public Dimension minimumSize()
   {
@@ -498,6 +515,17 @@
   }
  
   /**
+   * Returns an instance of {@link Dimension} representing the
+   * applet's width and height parameters.
+   *
+   * @return the applet's minimum size
+   */
+  public Dimension getMinimumSize()
+  {
+    return getDimensions ();
+  }
+
+  /**
    * This class provides accessibility support for Applets, and is the
    * runtime type returned by {@link #getAccessibleContext()}.
    *


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]