Author: Jindrich Dinga
1. Introduction
This document is the user experience specification for the JavaFX TitledPane control.
2. Overview
A TitledPane is a pane that can be expanded or collapsed, with a title on top. The visibility of the pane’s contents is toggled by clicking the whole TitledPane header or by using Space/Enter keys.
The TitledPane header can contain Open/Close control, an icon, and a title.
figure 1 TitledPane states
If a TitledPane is marked as "not collapsible", the Open/Close control should not appear in the header of the pane. Also, please note that it should not be possible to mark a TitledPane as "not expanded" and "not collapsible" at the same time.
3. Keyboard Support
The following table describes how keystrokes should be processed in case a TitledPane has focus:
Keystroke | Action |
---|---|
Enter / Space | When focus is on the header, expand/collapse its corresponding panel. |
Tab | When focus is on the header and its corresponding panel is expanded, move focus to the first focusable control in the panel. If focus is on the last focusable control in the panel, move focus to the next focusable control outside the TitledPane. When focus is on a header and its corresponding panel is collapsed, move focus to the next focusable control outside the TitledPane. |
Shift - Tab | When focus is on a focusable control in an expanded panel, move focus on previous focusable control in the panel. If focus is on the very first focusable control in the panel, move focus to the corresponding header. When focus is on a header, move focus to the previous focusable control outside the TitledPane. |