Author: Jindrich Dinga
1. Introduction
This document is the user experience specification for JavaFX CheckBox control.
2. Interaction Design
A CheckBox is a control that represents a setting or value with an ON or OFF choice. The setting of an individual checkbox is independent of other checkboxes--that is, more than one checkbox in a set can be checked at any given time.
A check mark within the checkbox indicates that the setting is selected. The following figure shows both available and unavailable checkboxes in selected and unselected states.
Figure 1 CheckBoxes
The user clicks a CheckBox to switch its setting from OFF to ON, or ON to OFF. When a CheckBox is unavailable, the user cannot change its setting.
Display CheckBox text to the right of the graphic unless the application is designed for locales with right-to-left writing systems, such as Arabic and Hebrew. In this case, display the text to the left of the graphic.
A mnemonic should be provided for each CheckBox.
In addition to ON and OFF states, a checkbox can also be INDETERMINATE, if used as a parent checkbox that contains checkboxes in both ON and OFF states. Note that a "leaf" checkbox should never be INDETERMINATE.
Figure 2 States of Checkboxes
CheckBox Menu Items
A CheckBox menu item is a menu item that appears with a CheckBox next to it to represent an ON or OFF setting. A check mark indicates that the attribute associated with that menu item is turned on. A dimmed checkbox menu item (checked or unchecked) indicates that the setting cannot be changed. The following figure shows checked, unchecked, and unavailable menu items.
Figure 3 CheckBox Menu Items
You can use checkbox menu items to present users with a nonexclusive choice.
Note that there is no difference in behavior of CheckBoxes on Desktop and Embedded, except that there is no mnemonic support on Embedded platforms.
4. Navigation
The following chapters describe how CheckBoxes/Switches are activated/deactivated. Navigation for check box menu items is described in the Menu UE Spec.
Mouse Support
The following table describes actions that are performed when users click on:
Action | |
---|---|
CheckBox | Toggle state (checked, not checked, mixed). |
Touch Support
The following table describes actions that are performed when users tap on:
Action | |
---|---|
CheckBox | Toggle state (checked, not checked, mixed). |
Directional Keys + OK/Select Support
The following table describes actions that are performed when a CheckBox is focused and users press the following keys:
Action | |
---|---|
UP/DOWN/LEFT/RIGHT | Move focus up/down/left/right. |
OK/SELECT | Toggle state (checked, not checked, mixed). |
Keyboard Support
The following table describes actions that are performed when a CheckBox is focused and users press the following keys:
Action | |
---|---|
SPACEBAR | Toggle state (checked, not checked, mixed) |
TAB | Move focus to the next focusable component. |
SHIFT-TAB | Move focus to the previous focusable component. |