From deb729e2cdcf94ad21551d032d25ed4c9c0f0309 Mon Sep 17 00:00:00 2001 From: shaper Date: Thu, 22 Aug 2002 01:14:55 +0000 Subject: [PATCH] Rolled back to deprecated call to getBoundingBox() so as to properly effect desired functionality and avoid infinite recursion. Since Polygon.calculateBounds() has package-protected access, our only happily non-deprecated alternative is to copy calculateBounds() and the code from Polygon.getBoundingBox() into this class, explicitly avoiding a call to bounds.getBounds(), but for now I choose to live with deprecation. git-svn-id: https://samskivert.googlecode.com/svn/trunk@821 6335cc39-0255-0410-8fd6-9bcaacd3b74c --- .../src/java/com/samskivert/swing/SmartPolygon.java | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/projects/samskivert/src/java/com/samskivert/swing/SmartPolygon.java b/projects/samskivert/src/java/com/samskivert/swing/SmartPolygon.java index a45d8a9d..4280542f 100644 --- a/projects/samskivert/src/java/com/samskivert/swing/SmartPolygon.java +++ b/projects/samskivert/src/java/com/samskivert/swing/SmartPolygon.java @@ -1,5 +1,5 @@ // -// $Id: SmartPolygon.java,v 1.3 2002/08/20 18:57:31 mdb Exp $ +// $Id: SmartPolygon.java,v 1.4 2002/08/22 01:14:55 shaper Exp $ // // samskivert library - useful routines for java programs // Copyright (C) 2001 Michael Bayne @@ -30,21 +30,12 @@ import java.awt.Rectangle; */ public class SmartPolygon extends Polygon { - /** - * Returns the internally cached bounds rectangle for this polygon. - * Don't modify it! - */ - public Rectangle getBounds () - { - return (bounds == null) ? super.getBounds() : bounds; - } - /** * Returns the internally cached bounds rectangle for this polygon. * Don't modify it! */ public Rectangle getBoundingBox () { - return (bounds == null) ? super.getBounds() : bounds; + return (bounds == null) ? super.getBoundingBox() : bounds; } }