Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
WindowConfiguration |
|
| 1.0;1 |
1 | package org.jtheque.core.managers.view.impl; | |
2 | ||
3 | /* | |
4 | * This file is part of JTheque. | |
5 | * | |
6 | * JTheque is free software: you can redistribute it and/or modify | |
7 | * it under the terms of the GNU General Public License as published by | |
8 | * the Free Software Foundation, either version 3 of the License. | |
9 | * | |
10 | * JTheque is distributed in the hope that it will be useful, | |
11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
13 | * GNU General Public License for more details. | |
14 | * | |
15 | * You should have received a copy of the GNU General Public License | |
16 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
17 | */ | |
18 | ||
19 | /** | |
20 | * A Window Configuration. It seems a state to persist the location and the size on a window in closing. | |
21 | * | |
22 | * @author Baptiste Wicht | |
23 | */ | |
24 | 0 | public final class WindowConfiguration { |
25 | private int width; | |
26 | private int height; | |
27 | private int positionX; | |
28 | private int positionY; | |
29 | ||
30 | /** | |
31 | * Set the width of the window. | |
32 | * | |
33 | * @param width The width of the window. | |
34 | */ | |
35 | public void setWidth(int width) { | |
36 | 0 | this.width = width; |
37 | 0 | } |
38 | ||
39 | /** | |
40 | * Set the height of the window. | |
41 | * | |
42 | * @param height The height of the window. | |
43 | */ | |
44 | public void setHeight(int height) { | |
45 | 0 | this.height = height; |
46 | 0 | } |
47 | ||
48 | /** | |
49 | * Set the X position of the window. | |
50 | * | |
51 | * @param positionX The X position of the window. | |
52 | */ | |
53 | public void setPositionX(int positionX) { | |
54 | 0 | this.positionX = positionX; |
55 | 0 | } |
56 | ||
57 | /** | |
58 | * Set the Y position of the window. | |
59 | * | |
60 | * @param positionY The Y position of the window. | |
61 | */ | |
62 | public void setPositionY(int positionY) { | |
63 | 0 | this.positionY = positionY; |
64 | 0 | } |
65 | ||
66 | /** | |
67 | * Return the width of the window. | |
68 | * | |
69 | * @return The width of the window. | |
70 | */ | |
71 | public int getWidth() { | |
72 | 0 | return width; |
73 | } | |
74 | ||
75 | /** | |
76 | * Return the height of the window. | |
77 | * | |
78 | * @return The height of the window. | |
79 | */ | |
80 | public int getHeight() { | |
81 | 0 | return height; |
82 | } | |
83 | ||
84 | /** | |
85 | * Return the Y position of the window. | |
86 | * | |
87 | * @return The Y position of the window. | |
88 | */ | |
89 | public int getPositionY() { | |
90 | 0 | return positionY; |
91 | } | |
92 | ||
93 | /** | |
94 | * Return the X position of the window. | |
95 | * | |
96 | * @return The X position of the window. | |
97 | */ | |
98 | public int getPositionX() { | |
99 | 0 | return positionX; |
100 | } | |
101 | } |