From 8039a4ea734415951af932bb5dc93a9cbc5f13dc Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Sun, 23 Jul 2000 00:24:14 +0000 Subject: Makefile.in: Rebuilt. * Makefile.in: Rebuilt. * Makefile.am (awt_java_source_files): Updated for new files. * java/awt/Adjustable.java (HORIZONTAL, VERTICAL): Set values. * java/awt/Label.java: New file. * java/awt/Rectangle.java (Rectangle): Extend Rectangle2D. (createIntersection, createUnion, getBounds2D): New methods. * java/awt/Scrollbar.java: New file. * java/awt/Shape.java: Updated to 1.2. * java/awt/geom/AffineTransform.java: New file. * java/awt/geom/Ellipse2D.java: New file. * java/awt/geom/NoninvertibleTransformException.java: New file. * java/awt/geom/PathIterator.java: New file. * java/awt/geom/Rectangle2D.java: New file. * java/awt/geom/RectangularShape.java: New file. * java/awt/geom/Point2D.java (Double, Float): New inner classes. * java/awt/geom/IllegalPathStateException.java: New file. From-SVN: r35195 --- libjava/java/awt/Rectangle.java | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'libjava/java/awt/Rectangle.java') diff --git a/libjava/java/awt/Rectangle.java b/libjava/java/awt/Rectangle.java index c741a337aa5..8fb18a1493e 100644 --- a/libjava/java/awt/Rectangle.java +++ b/libjava/java/awt/Rectangle.java @@ -1,4 +1,4 @@ -/* Copyright (C) 1999 Free Software Foundation +/* Copyright (C) 1999, 2000 Free Software Foundation This file is part of libjava. @@ -7,11 +7,11 @@ Libjava License. Please consult the file "LIBJAVA_LICENSE" for details. */ package java.awt; +import java.awt.geom.*; /* Status: Mostly complete. Some of the Java2D stuff is commented out. */ -// FIXME: Should extend Rectangle2D for 1.2 implementation -public class Rectangle implements Cloneable, Shape +public class Rectangle extends Rectangle2D implements Cloneable, Shape { public int x; public int y; @@ -151,6 +151,12 @@ public class Rectangle implements Cloneable, Shape return new Point(x,y); } + public PathIterator getPathIterator (AffineTransform t) + { + // FIXME + return null; + } + public Dimension getSize() { return new Dimension(width, height); @@ -307,25 +313,32 @@ public class Rectangle implements Cloneable, Shape } // Commented out until we have Rectangle2D - /* public Rectangle2D createIntersection(Rectangle2D r) { + // FIXME: maybe we should consider returning a Rectangle or + // Rectangle2D.Float depending on type of R. + Rectangle2D.Double res = new Rectangle2D.Double (); + intersect (this, r, res); + return res; } public Rectangle2D createUnion(Rectangle2D r) { + // FIXME: maybe we should consider returning a Rectangle or + // Rectangle2D.Float depending on type of R. + Rectangle2D.Double res = new Rectangle2D.Double (); + union (this, r, res); + return res; } public Rectangle2D getBounds2D() { + return new Rectangle (x, y, width, height); } - */ public String toString() { return getClass().getName() + "[x=" + x + ",y=" + y + ",width=" + width + ",height=" + height + "]"; } - - } -- cgit v1.2.3