+ /**
+ * Handle mouse checkbox presses.
+ *
+ * @param mouse mouse button down event
+ */
+ @Override
+ public void onMouseDown(final TMouseEvent mouse) {
+ if ((mouseOnCheckbox(mouse)) && (mouse.isMouse1())) {
+ // Switch state
+ checked = !checked;
+ }
+ }
+
+ /**
+ * Handle keystrokes.
+ *
+ * @param keypress keystroke event
+ */
+ @Override
+ public void onKeypress(final TKeypressEvent keypress) {
+ if (keypress.equals(kbSpace)) {
+ checked = !checked;
+ return;
+ }
+
+ // Pass to parent for the things we don't care about.
+ super.onKeypress(keypress);
+ }
+
+ // ------------------------------------------------------------------------
+ // TWidget ----------------------------------------------------------------
+ // ------------------------------------------------------------------------
+