1
2
3
4
5
6
7 package ch.colabproject.colab.api.controller.card.grid;
8
9 import ch.colabproject.colab.generator.model.annotations.ExtractJavaDoc;
10 import javax.validation.constraints.NotNull;
11
12
13
14
15
16
17 @ExtractJavaDoc
18 public class GridPosition implements GridCell {
19
20
21
22
23 @NotNull
24 private Integer x;
25
26
27
28
29 @NotNull
30 private Integer y;
31
32
33
34
35 @NotNull
36 private Integer width;
37
38
39
40
41 @NotNull
42 private Integer height;
43
44
45
46
47 public GridPosition() {
48 this.x = 1;
49 this.y = 1;
50 this.width = 1;
51 this.height = 1;
52 }
53
54
55
56
57
58
59
60
61
62 public GridPosition(Integer x, Integer y, Integer width, Integer height) {
63 this.x = x;
64 this.y = y;
65 this.width = width;
66 this.height = height;
67 }
68
69 @Override
70 public Integer getX() {
71 return x;
72 }
73
74 @Override
75 public void setX(Integer x) {
76 this.x = x;
77 }
78
79 @Override
80 public Integer getY() {
81 return y;
82 }
83
84 @Override
85 public void setY(Integer y) {
86 this.y = y;
87 }
88
89 @Override
90 public Integer getWidth() {
91 return width;
92 }
93
94 @Override
95 public void setWidth(Integer width) {
96 this.width = width;
97 }
98
99 @Override
100 public Integer getHeight() {
101 return height;
102 }
103
104 @Override
105 public void setHeight(Integer height) {
106 this.height = height;
107 }
108 }