repositories
/
Persons_Comparator.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Finish the SizeView by using a JSpinner.
[Persons_Comparator.git]
/
src
/
Size.java
diff --git
a/src/Size.java
b/src/Size.java
index 6946e5a8967e2358072fccd1fb7fa13e619e9f9d..a0e7d780900685c817fd46e26a46ffb5303614c5 100644
(file)
--- a/
src/Size.java
+++ b/
src/Size.java
@@
-1,6
+1,6
@@
public class Size implements Comparable<Size> {
private int max = 240;
public class Size implements Comparable<Size> {
private int max = 240;
- private int min =
2
0;
+ private int min =
4
0;
private int size;
Size() {
private int size;
Size() {
@@
-10,6
+10,14
@@
public class Size implements Comparable<Size> {
setSize(size);
}
setSize(size);
}
+ public int getMin() {
+ return min;
+ }
+
+ public int getMax() {
+ return max;
+ }
+
public int getSize() {
return size;
}
public int getSize() {
return size;
}
@@
-18,7
+26,7
@@
public class Size implements Comparable<Size> {
if (validateSize(size)) {
this.size = size;
} else {
if (validateSize(size)) {
this.size = size;
} else {
- throw new IllegalArgumentException("Size must be between " + this.
min + " and " + this.max
);
+ throw new IllegalArgumentException("Size must be between " + this.
getMin() + " and " + this.getMax()
);
}
}
}
}