1
2
3
4
5
6 package org.lsst.ccs.utilities.zonesui;
7
8 import java.awt.Shape;
9
10
11
12
13
14 public class ZRectangle implements ShapeBean {
15 private int x, y, width, height ;
16
17 public ZRectangle() {}
18
19 public ZRectangle (int ix, int iy, int iw, int ih) {
20 this.x = ix;
21 this.y = iy;
22 this.width = iw;
23 this.height = ih;
24 }
25
26
27 public int getX () {return x;}
28 public int getY () {return y;}
29 public int getWidth () {return width;}
30 public int getHeight () {return height;}
31
32
33 public void setX (int i) {this.x = i;}
34 public void setY (int i) {this.y = i;}
35 public void setWidth (int i) {this.width = i;}
36 public void setHeight (int i) {this.height = i;}
37
38
39 @Override
40 public Shape genShape() {
41 return new java.awt.Rectangle(this.x, this.y, this.width, this.height);
42 }
43 @Override
44 public String toString() {
45 return "ZRectangle ("+this.x+","+this.y+","+this.width+","+this.height+")";
46 }
47
48 }