aboutsummaryrefslogtreecommitdiff
path: root/src/Point2D.java
blob: cde1caf5697f681ed9be9769525f25225c46ef61 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
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
 */