public class CheckBox
  Comment     Returned-by     Constructor-argument     Method-argument     Field-type     Type-bound     Links  

A tri-state selection Control typically skinned as a box with a checkmark or tick mark when checked. A CheckBox control can be in one of three states:

If a CheckBox is checked, then it is also by definition defined. When checked the CheckBox is typically rendered with a "check" or "tick" mark. A CheckBox is in this state if selected is true and indeterminate is false.

A CheckBox is unchecked if selected is false and indeterminate is false.

A CheckBox is undefined if indeterminate is true, regardless of the state of selected. A typical rendering would be with a minus or dash, to indicate an undefined or indeterminate state of the CheckBox. This is convenient for constructing tri-state checkbox based trees, for example, where undefined check boxes typically mean "inherit settings from the parent".

The allowIndeterminate variable, if true, allows the user to cycle through the undefined state. If false, the CheckBox is not in the indeterminate state, and the user is allowed to change only the checked state.

Example:

CheckBox cb = new CheckBox("a checkbox");
 cb.setIndeterminate(false);

MnemonicParsing is enabled by default for CheckBox.

extends ButtonBase

Since:  JavaFX 2.0