diff options
author | Tom Tromey <tromey@cygnus.com> | 2000-07-23 00:24:14 +0000 |
---|---|---|
committer | Tom Tromey <tromey@gcc.gnu.org> | 2000-07-23 00:24:14 +0000 |
commit | 8039a4ea734415951af932bb5dc93a9cbc5f13dc (patch) | |
tree | 015eb01267de18f0f0507f24597797582f311e45 /libjava/java/awt/Rectangle.java | |
parent | 4eb00163ad2a600403a9b36fdc7a47fd79ce98e6 (diff) | |
download | gcc-8039a4ea734415951af932bb5dc93a9cbc5f13dc.zip gcc-8039a4ea734415951af932bb5dc93a9cbc5f13dc.tar.gz gcc-8039a4ea734415951af932bb5dc93a9cbc5f13dc.tar.bz2 |
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
Diffstat (limited to 'libjava/java/awt/Rectangle.java')
-rw-r--r-- | libjava/java/awt/Rectangle.java | 27 |
1 files changed, 20 insertions, 7 deletions
diff --git a/libjava/java/awt/Rectangle.java b/libjava/java/awt/Rectangle.java index c741a33..8fb18a14 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 + "]"; } - - } |