-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRegion.java
More file actions
44 lines (38 loc) · 1.16 KB
/
Region.java
File metadata and controls
44 lines (38 loc) · 1.16 KB
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
import java.awt.*;
import javax.swing.*;
public class Region extends JFrame {
boolean locked;
int x;
int y;
int w;
int h;
String name;
String description;
boolean solved;
public Region( int x, int y, int w, int h, String name ){//temporary until further information is filled
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.name = name;
}
public Region( int x, int y, int w, int h, String name, String description, boolean solved ){
this.x = x;
this.y = y;
this.w = w;
this.h = h;
this.name = name;
this.description = description;
this.solved = solved;
}
public Rectangle getRectangle(){ return new Rectangle(x, y, w, h); }
public boolean equals(Region other){ return other!=null; }
public int getX(){ return x; }
public int getY(){ return y; }
public int getW(){ return w; }
public int getH(){ return h; }
public String getName(){ return name; }
public String getDesc(){ return description; }
public boolean isSolved(){ return solved; }
public void setSolved(boolean s) { solved = s; }
}