|
|||||||||||||||||||
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover | |||||||||||||||||||
Source file | Conditionals | Statements | Methods | TOTAL | |||||||||||||||
AbsoluteConstraints.java | 0% | 0% | 0% | 0% |
|
1 |
/*
|
|
2 |
* brownies and its relative products are published under the terms
|
|
3 |
* of the Apache Software License.
|
|
4 |
*
|
|
5 |
* Created on 2004/05/22 16:07:46
|
|
6 |
*/
|
|
7 |
package org.asyrinx.brownie.swing;
|
|
8 |
|
|
9 |
import java.awt.Dimension;
|
|
10 |
import java.awt.Point;
|
|
11 |
import java.io.Serializable;
|
|
12 |
|
|
13 |
/**
|
|
14 |
* @author akima
|
|
15 |
*/
|
|
16 |
public class AbsoluteConstraints implements Serializable { |
|
17 |
|
|
18 |
int x;
|
|
19 |
|
|
20 |
int y;
|
|
21 |
|
|
22 |
int width;
|
|
23 |
|
|
24 |
int height;
|
|
25 |
|
|
26 | 0 |
public AbsoluteConstraints(int i, int j) { |
27 | 0 |
width = -1; |
28 | 0 |
height = -1; |
29 | 0 |
x = i; |
30 | 0 |
y = j; |
31 |
} |
|
32 |
|
|
33 | 0 |
public AbsoluteConstraints(int i, int j, int k, int l) { |
34 | 0 |
width = -1; |
35 | 0 |
height = -1; |
36 | 0 |
x = i; |
37 | 0 |
y = j; |
38 | 0 |
width = k; |
39 | 0 |
height = l; |
40 |
} |
|
41 |
|
|
42 | 0 |
public AbsoluteConstraints(Point point) {
|
43 | 0 |
this(point.x, point.y);
|
44 |
} |
|
45 |
|
|
46 | 0 |
public AbsoluteConstraints(Point point, Dimension dimension) {
|
47 | 0 |
width = -1; |
48 | 0 |
height = -1; |
49 | 0 |
x = point.x; |
50 | 0 |
y = point.y; |
51 | 0 |
if (dimension != null) { |
52 | 0 |
width = dimension.width; |
53 | 0 |
height = dimension.height; |
54 |
} |
|
55 |
} |
|
56 |
|
|
57 | 0 |
public String toString() {
|
58 | 0 |
return super.toString() + " [x=" + x + ", y=" + y + ", width=" + width |
59 |
+ ", height=" + height + "]"; |
|
60 |
} |
|
61 |
|
|
62 | 0 |
public int getHeight() { |
63 | 0 |
return height;
|
64 |
} |
|
65 |
|
|
66 | 0 |
public int getWidth() { |
67 | 0 |
return width;
|
68 |
} |
|
69 |
|
|
70 | 0 |
public int getX() { |
71 | 0 |
return x;
|
72 |
} |
|
73 |
|
|
74 | 0 |
public int getY() { |
75 | 0 |
return y;
|
76 |
} |
|
77 |
|
|
78 |
/**
|
|
79 |
* @param i
|
|
80 |
*/
|
|
81 | 0 |
public void setHeight(int i) { |
82 | 0 |
height = i; |
83 |
} |
|
84 |
|
|
85 |
/**
|
|
86 |
* @param i
|
|
87 |
*/
|
|
88 | 0 |
public void setWidth(int i) { |
89 | 0 |
width = i; |
90 |
} |
|
91 |
|
|
92 |
/**
|
|
93 |
* @param i
|
|
94 |
*/
|
|
95 | 0 |
public void setX(int i) { |
96 | 0 |
x = i; |
97 |
} |
|
98 |
|
|
99 |
/**
|
|
100 |
* @param i
|
|
101 |
*/
|
|
102 | 0 |
public void setY(int i) { |
103 | 0 |
y = i; |
104 |
} |
|
105 |
|
|
106 |
} |
|