aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/Polygon.java
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2004-02-03 17:10:56 +0000
committerThomas Fitzsimmons <fitzsim@gcc.gnu.org>2004-02-03 17:10:56 +0000
commitb6d3cb37ef676c2439fdf9498e4dbe8042fb3c6a (patch)
tree69b793f3808108f9a710a0f4875efb2e7eea8892 /libjava/java/awt/Polygon.java
parent5a98fa7bdb847dc92fdbeddf4dfcff51835aca48 (diff)
downloadgcc-b6d3cb37ef676c2439fdf9498e4dbe8042fb3c6a.zip
gcc-b6d3cb37ef676c2439fdf9498e4dbe8042fb3c6a.tar.gz
gcc-b6d3cb37ef676c2439fdf9498e4dbe8042fb3c6a.tar.bz2
GtkListPeer.java, [...]: Fix handling of alias methods...
2004-02-03 Thomas Fitzsimmons <fitzsim@redhat.com> * gnu/java/awt/peer/gtk/GtkListPeer.java, java/awt/BorderLayout.java, java/awt/CardLayout.java, java/awt/CheckboxGroup.java, java/awt/Choice.java, java/awt/Component.java, java/awt/Container.java, java/awt/FontMetrics.java, java/awt/GridBagLayout.java, java/awt/LayoutManager2.java, java/awt/List.java, java/awt/Menu.java, java/awt/MenuBar.java, java/awt/MenuItem.java, java/awt/Polygon.java, java/awt/Rectangle.java, java/awt/ScrollPane.java, java/awt/Scrollbar.java, java/awt/TextArea.java, java/awt/TextField.java, java/awt/image/renderable/RenderContext.java, javax/swing/JApplet.java: Fix handling of alias methods, where a method has been deprecated in favour of a new one with the same funtion but a different name. Put the method implementation in the deprecated method and have the new method call the deprecated one. Make all other code call the new method. From-SVN: r77178
Diffstat (limited to 'libjava/java/awt/Polygon.java')
-rw-r--r--libjava/java/awt/Polygon.java32
1 files changed, 16 insertions, 16 deletions
diff --git a/libjava/java/awt/Polygon.java b/libjava/java/awt/Polygon.java
index 113dad9..e91144c 100644
--- a/libjava/java/awt/Polygon.java
+++ b/libjava/java/awt/Polygon.java
@@ -258,10 +258,24 @@ public class Polygon implements Shape, Serializable
*/
public Rectangle getBounds()
{
+ return getBoundingBox ();
+ }
+
+ /**
+ * Returns the bounding box of this polygon. This is the smallest
+ * rectangle with sides parallel to the X axis that will contain this
+ * polygon.
+ *
+ * @return the bounding box for this polygon
+ * @see #getBounds2D()
+ * @deprecated use {@link #getBounds()} instead
+ */
+ public Rectangle getBoundingBox()
+ {
if (bounds == null)
{
if (npoints == 0)
- return bounds = new Rectangle();
+ return bounds = new Rectangle ();
int i = npoints - 1;
int minx = xpoints[i];
int maxx = minx;
@@ -280,26 +294,12 @@ public class Polygon implements Shape, Serializable
else if (y > maxy)
maxy = y;
}
- bounds = new Rectangle(minx, maxy, maxx - minx, maxy - miny);
+ bounds = new Rectangle (minx, maxy, maxx - minx, maxy - miny);
}
return bounds;
}
/**
- * Returns the bounding box of this polygon. This is the smallest
- * rectangle with sides parallel to the X axis that will contain this
- * polygon.
- *
- * @return the bounding box for this polygon
- * @see #getBounds2D()
- * @deprecated use {@link #getBounds()} instead
- */
- public Rectangle getBoundingBox()
- {
- return getBounds();
- }
-
- /**
* Tests whether or not the specified point is inside this polygon.
*
* @param p the point to test