git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merge
[fanfix.git]
/
src
/
jexer
/
TCheckbox.java
diff --git
a/src/jexer/TCheckbox.java
b/src/jexer/TCheckbox.java
index 556a11bec8e3965291ca4f2398062a46d8b208c6..b33d1f59252705042adf945af8a325bc6785c618 100644
(file)
--- a/
src/jexer/TCheckbox.java
+++ b/
src/jexer/TCheckbox.java
@@
-64,13
+64,9
@@
public final class TCheckbox extends TWidget {
final String label, final boolean checked) {
// Set parent and window
final String label, final boolean checked) {
// Set parent and window
- super(parent);
+ super(parent
, x, y, label.length() + 4, 1
);
- setX(x);
- setY(y);
- setHeight(1);
this.label = label;
this.label = label;
- setWidth(label.length() + 4);
this.checked = checked;
setHasCursor(true);
this.checked = checked;
setHasCursor(true);
@@
-84,8
+80,7
@@
public final class TCheckbox extends TWidget {
* @return true if the mouse is currently on the checkbox
*/
private boolean mouseOnCheckbox(final TMouseEvent mouse) {
* @return true if the mouse is currently on the checkbox
*/
private boolean mouseOnCheckbox(final TMouseEvent mouse) {
- if ((mouse != null)
- && (mouse.getY() == 0)
+ if ((mouse.getY() == 0)
&& (mouse.getX() >= 0)
&& (mouse.getX() <= 2)
) {
&& (mouse.getX() >= 0)
&& (mouse.getX() <= 2)
) {