aboutsummaryrefslogtreecommitdiff
path: root/libjava/java/awt/geom/Point2D.java
diff options
context:
space:
mode:
authorTom Tromey <tromey@cygnus.com>2000-07-23 00:24:14 +0000
committerTom Tromey <tromey@gcc.gnu.org>2000-07-23 00:24:14 +0000
commit8039a4ea734415951af932bb5dc93a9cbc5f13dc (patch)
tree015eb01267de18f0f0507f24597797582f311e45 /libjava/java/awt/geom/Point2D.java
parent4eb00163ad2a600403a9b36fdc7a47fd79ce98e6 (diff)
downloadgcc-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/geom/Point2D.java')
-rw-r--r--libjava/java/awt/geom/Point2D.java82
1 files changed, 80 insertions, 2 deletions
diff --git a/libjava/java/awt/geom/Point2D.java b/libjava/java/awt/geom/Point2D.java
index c0f2056..93ed520 100644
--- a/libjava/java/awt/geom/Point2D.java
+++ b/libjava/java/awt/geom/Point2D.java
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999 Free Software Foundation
+/* Copyright (C) 1999, 2000 Free Software Foundation
This file is part of libjava.
@@ -10,7 +10,7 @@ package java.awt.geom;
/**
* @author Per Bothner <bothner@cygnus.com>
- * @date Fenruary 8, 1999.
+ * @date February 8, 1999.
*/
/* Written using "Java Class Libraries", 2nd edition, plus online
@@ -66,4 +66,82 @@ public abstract class Point2D implements Cloneable
{
return super.clone();
}
+
+ public static class Double extends Point2D
+ {
+ public double x;
+ public double y;
+
+ public Double ()
+ {
+ x = 0;
+ y = 0;
+ }
+
+ public Double (double x, double y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ public double getX ()
+ {
+ return x;
+ }
+
+ public double getY ()
+ {
+ return y;
+ }
+
+ public void setLocation (double x, double y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ public String toString ()
+ {
+ return "(" + x + ", " + y + ")";
+ }
+ }
+
+ public static class Float extends Point2D
+ {
+ public float x;
+ public float y;
+
+ public Float ()
+ {
+ x = 0;
+ y = 0;
+ }
+
+ public Float (float x, float y)
+ {
+ this.x = x;
+ this.y = y;
+ }
+
+ public double getX ()
+ {
+ return x;
+ }
+
+ public double getY ()
+ {
+ return y;
+ }
+
+ public void setLocation (double x, double y)
+ {
+ this.x = (float) x;
+ this.y = (float) y;
+ }
+
+ public String toString ()
+ {
+ return "(" + x + ", " + y + ")";
+ }
+ }
}