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;
- setWidth(label.length() + 4);
this.checked = checked;
setHasCursor(true);
* @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)
) {