An accordion is a group of TitlePanes. Only one TitledPane can be opened at
a time.
The TitledPane content in an accordion can be any javafx. such as UI controls or groups
of nodes added to a layout container.
It is not recommended to set the MinHeight, PrefHeight, or MaxHeight for this control. Unexpected behavior will occur because the Accordion's height changes when a TitledPane is opened or closed.
Accordion sets focusTraversable to false.
Example:
TitledPane t1 = new TitledPane("T1", new Button("B1"));
TitledPane t2 = new TitledPane("T2", new Button("B2"));
TitledPane t3 = new TitledPane("T3", new Button("B3"));
Accordion accordion = new Accordion();
accordion.getPanes().addAll(t1, t2, t3);
| Modifier and Type | Field and Description |
|---|---|
| private Orientation | |
| private boolean | |
| private static final String | |
| private ObjectProperty | |
| private final ObservableList |
| Access | Constructor and Description |
|---|---|
| public | |
| public | Accordion(TitledPane...
The TitledPanes to show inside the Accordion. titledPanes)Creates a new Accordion with the given TitledPanes showing within it. |
| Modifier and Type | Method and Description |
|---|---|
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public final ObjectProperty | Returns: The expanded TitledPane in the Accordion.The expanded TitledPane in the Accordion. |
| public Orientation | getContentBias()
Overrides javafx. Returns the orientation of a node's resizing bias for layout purposes. |
| public final TitledPane | Returns: The expanded TitledPane in the Accordion.Gets the expanded TitledPane in the Accordion. |
| protected Boolean | getInitialFocusTraversable()
Overrides javafx. Returns the initial focus traversable state of this control, for use by the JavaFX CSS engine to correctly set its initial value. |
| public final ObservableList | Returns: The list of TitledPane in this Accordion.Gets the list of |
| public void | requestLayout()
Overrides javafx. Requests a layout pass to be performed before the next scene is rendered. |
| public final void | setExpandedPane(TitledPane
the expanded value)TitledPaneThe expanded |
| bias | back to summary |
|---|---|
| private Orientation bias | |
| biasDirty | back to summary |
|---|---|
| private boolean biasDirty | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS | |
| expandedPane | back to summary |
|---|---|
| private ObjectProperty<TitledPane> expandedPane | |
| panes | back to summary |
|---|---|
| private final ObservableList<TitledPane> panes | |
| Accordion | back to summary |
|---|---|
| public Accordion() Creates a new Accordion with no TitledPanes. | |
| Accordion | back to summary |
|---|---|
| public Accordion(TitledPane... titledPanes) Creates a new Accordion with the given TitledPanes showing within it.
| |
| createDefaultSkin | back to summary |
|---|---|
| protected Skin Overrides javafx. Doc from javafx. Create a new instance of the default skin for this control. This is called to create a skin for the control if
no skin is provided via CSS | |
| expandedPaneProperty | back to summary |
|---|---|
| public final ObjectProperty The expanded TitledPane in the Accordion.
| |
| getContentBias | back to summary |
|---|---|
| public Orientation getContentBias() Overrides javafx. Doc from javafx. Returns the orientation of a node's resizing bias for layout purposes. If the node type has no bias, returns null. If the node is resizable and it's height depends on its width, returns HORIZONTAL, else if its width depends on its height, returns VERTICAL. Resizable subclasses should override this method to return an appropriate value.
| |
| getExpandedPane | back to summary |
|---|---|
| public final TitledPane getExpandedPane() Gets the expanded TitledPane in the Accordion. If the expanded pane has been
removed or there is no expanded TitledPane
| |
| getInitialFocusTraversable | back to summary |
|---|---|
| protected Boolean getInitialFocusTraversable() Overrides javafx. Returns the initial focus traversable state of this control, for use by the JavaFX CSS engine to correctly set its initial value. This method is overridden as by default UI controls have focus traversable set to true, but that is not appropriate for this control.
| |
| getPanes | back to summary |
|---|---|
| public final ObservableList Gets the list of
| |
| requestLayout | back to summary |
|---|---|
| public void requestLayout() Overrides javafx. Doc from javafx. Requests a layout pass to be performed before the next scene is rendered. This is batched up asynchronously to happen once per "pulse", or frame of animation. If this parent is either a layout root or unmanaged, then it will be added directly to the scene's dirty layout list, otherwise requestParentLayout will be invoked.
| |
| setExpandedPane | back to summary |
|---|---|
| public final void setExpandedPane(TitledPane value) The expanded
| |