aboutsummaryrefslogtreecommitdiff
path: root/src/Point2D.java
diff options
context:
space:
mode:
authorJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
committerJoshua Rahm <joshua.rahm@colorado.edu>2015-01-30 17:11:48 -0700
commit1c5e38fe69ac8a6decbdd8abe93112f4e3369315 (patch)
tree926cef8cb76d46862ed2c4ec7028720611e47476 /src/Point2D.java
downloadModulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.gz
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.tar.bz2
Modulus3D-1c5e38fe69ac8a6decbdd8abe93112f4e3369315.zip
added source
Diffstat (limited to 'src/Point2D.java')
-rw-r--r--src/Point2D.java63
1 files changed, 63 insertions, 0 deletions
diff --git a/src/Point2D.java b/src/Point2D.java
new file mode 100644
index 0000000..cde1caf
--- /dev/null
+++ b/src/Point2D.java
@@ -0,0 +1,63 @@
+/* */ import java.awt.Graphics;
+/* */ import java.awt.Point;
+/* */
+/* */ public class Point2D
+/* */ {
+/* */ private double x;
+/* */ private double y;
+/* */ private PointInvoker invoker;
+/* 16 */ public static final PointInvoker DONOTHING_POINT_INVOKER = new PointInvoker() {
+/* 16 */ public void drawPoint(Graphics g, int x, int y) { } } ;
+/* */
+/* */ public Point2D(double x, double y)
+/* */ {
+/* 24 */ this.x = x;
+/* 25 */ this.y = y;
+/* 26 */ this.invoker = DONOTHING_POINT_INVOKER;
+/* */ }
+/* */
+/* */ public Point2D(Point x)
+/* */ {
+/* 32 */ this(x.x, x.y);
+/* */ }
+/* */
+/* */ public double getRealX()
+/* */ {
+/* 38 */ return this.x;
+/* */ }
+/* */
+/* */ public int getX()
+/* */ {
+/* 44 */ return (int)this.x;
+/* */ }
+/* */
+/* */ public double getRealY()
+/* */ {
+/* 50 */ return this.y;
+/* */ }
+/* */
+/* */ public int getY()
+/* */ {
+/* 56 */ return (int)this.y;
+/* */ }
+/* */
+/* */ public void setInvoker(PointInvoker invoker)
+/* */ {
+/* 62 */ this.invoker = invoker;
+/* */ }
+/* */
+/* */ public PointInvoker getInvoker()
+/* */ {
+/* 68 */ return this.invoker;
+/* */ }
+/* */
+/* */ public String toString()
+/* */ {
+/* 75 */ return "(" + this.x + "," + this.y + ")";
+/* */ }
+/* */ }
+
+/* Location: Modulus.jar
+ * Qualified Name: Point2D
+ * JD-Core Version: 0.6.2
+ */ \ No newline at end of file