A TitledPane is a panel with a title that can be opened and closed.
The panel in a TitledPane can be any Node 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 TitledPane's height changes when it is opened or closed.
Note that whilst TitledPane extends from Labeled, the inherited properties
are used to manipulate the TitledPane header, not the content area itself. If
the intent is to modify the content area, consider using a layout container
such as javafx. and setting your actual content
inside of that. You can then manipulate the StackPane to get the layout
results you are after.
Example:
TitledPane t1 = new TitledPane("T1", new Button("B1"));
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private BooleanProperty | |
| private BooleanProperty | |
| private ObjectProperty | |
| private static final String | |
| private BooleanProperty | |
| private static final PseudoClass | |
| private static final PseudoClass |
| Access | Constructor and Description |
|---|---|
| public | |
| public | TitledPane(String
The title of the TitledPane. title, Node The content of the TitledPane. content)Creates a new TitledPane with a title and content. |
| Modifier and Type | Method and Description |
|---|---|
| public final BooleanProperty | |
| public final BooleanProperty | |
| public final ObjectProperty | |
| protected Skin | createDefaultSkin()
Overrides javafx. Create a new instance of the default skin for this control. |
| public void | executeAccessibleAction(AccessibleAction
the action to execute action, Object... optional list of parameters parameters)Overrides javafx. This method is called by the assistive technology to request the action indicated by the argument should be executed. |
| public final BooleanProperty | |
| public static List | Returns: theCssMetaDataHides javafx. Gets the |
| public final Node | |
| public Orientation | getContentBias()
Overrides javafx. If wrapText is true, then contentBias will be HORIZONTAL, otherwise it is null. |
| public List | getControlCssMetaData()
Overrides javafx. Gets the unmodifiable list of the control's CSS-styleable properties. |
| public final boolean | Returns: The animated state of the TitledPane.Returns the animated state of the TitledPane. |
| public final boolean | Returns: The collapsible state of the TitledPane.Returns the collapsible state of the TitlePane. |
| public final boolean | |
| public Object | queryAccessibleAttribute(AccessibleAttribute
the requested attribute attribute, Object... optional list of parameters parameters)Overrides javafx. This method is called by the assistive technology to request the value for an attribute. |
| public final void | setAnimated(boolean
a flag indicating the animated state value)Specifies how the TitledPane should open and close. |
| public final void | setCollapsible(boolean
a flag indicating the collapsible state value)Specifies if the TitledPane can be collapsed. |
| public final void | setContent(Node
The content for this TitlePane. value)The content of the TitlePane which can be any Node such as UI controls or groups of nodes added to a layout container. |
| public final void | setExpanded(boolean
a flag indicating the expanded state value)Sets the expanded state of the TitledPane. |
| animated | back to summary |
|---|---|
| private BooleanProperty animated | |
| collapsible | back to summary |
|---|---|
| private BooleanProperty collapsible | |
| content | back to summary |
|---|---|
| private ObjectProperty<Node> content | |
| DEFAULT_STYLE_CLASS | back to summary |
|---|---|
| private static final String DEFAULT_STYLE_CLASS | |
| expanded | back to summary |
|---|---|
| private BooleanProperty expanded | |
| PSEUDO_CLASS_COLLAPSED | back to summary |
|---|---|
| private static final PseudoClass PSEUDO_CLASS_COLLAPSED | |
| PSEUDO_CLASS_EXPANDED | back to summary |
|---|---|
| private static final PseudoClass PSEUDO_CLASS_EXPANDED | |
| TitledPane | back to summary |
|---|---|
| public TitledPane() Creates a new TitledPane with no title or content. | |
| TitledPane | back to summary |
|---|---|
| public TitledPane(String title, Node content) Creates a new TitledPane with a title and content. | |
| animatedProperty | back to summary |
|---|---|
| public final BooleanProperty animatedProperty() The animated state of the TitledPane.
| |
| collapsibleProperty | back to summary |
|---|---|
| public final BooleanProperty collapsibleProperty() The collapsible state of the TitledPane.
| |
| contentProperty | back to summary |
|---|---|
| public final ObjectProperty The content of the TitledPane.
| |
| 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 | |
| executeAccessibleAction | back to summary |
|---|---|
| public void executeAccessibleAction(AccessibleAction action, Object... parameters) Overrides javafx. Doc from javafx. This method is called by the assistive technology to request the action indicated by the argument should be executed.
This method is commonly overridden by subclasses to implement
action that are required for a specific role.
| |
| expandedProperty | back to summary |
|---|---|
| public final BooleanProperty expandedProperty() The expanded state of the TitledPane.
| |
| getClassCssMetaData | back to summary |
|---|---|
| public static List Hides javafx. Gets the
| |
| getContent | back to summary |
|---|---|
| public final Node getContent() The content of the TitledPane.
| |
| getContentBias | back to summary |
|---|---|
| public Orientation getContentBias() Overrides javafx. Doc from javafx. If wrapText is true, then contentBias will be HORIZONTAL, otherwise it is null.
| |
| getControlCssMetaData | back to summary |
|---|---|
| public List Overrides javafx. Doc from javafx. Gets the unmodifiable list of the control's CSS-styleable properties.
| |
| isAnimated | back to summary |
|---|---|
| public final boolean isAnimated() Returns the animated state of the TitledPane.
| |
| isCollapsible | back to summary |
|---|---|
| public final boolean isCollapsible() Returns the collapsible state of the TitlePane.
| |
| isExpanded | back to summary |
|---|---|
| public final boolean isExpanded() | |
| queryAccessibleAttribute | back to summary |
|---|---|
| public Object queryAccessibleAttribute(AccessibleAttribute attribute, Object... parameters) Overrides javafx. Doc from javafx. This method is called by the assistive technology to request the value for an attribute.
This method is commonly overridden by subclasses to implement
attributes that are required for a specific role.
| |
| setAnimated | back to summary |
|---|---|
| public final void setAnimated(boolean value) Specifies how the TitledPane should open and close. The panel will be
animated out when this value is set to
| |
| setCollapsible | back to summary |
|---|---|
| public final void setCollapsible(boolean value) Specifies if the TitledPane can be collapsed. The default is
| |
| setContent | back to summary |
|---|---|
| public final void setContent(Node value) The content of the TitlePane which can be any Node such as UI controls or groups of nodes added to a layout container.
| |
| setExpanded | back to summary |
|---|---|
| public final void setExpanded(boolean value) Sets the expanded state of the TitledPane. The default is
| |
| Modifier and Type | Field and Description |
|---|---|
| private static final CssMetaData | |
| private static final CssMetaData | |
| private static final List |
| Access | Constructor and Description |
|---|---|
| private |
| ANIMATED | back to summary |
|---|---|
| private static final CssMetaData<TitledPane, Boolean> ANIMATED | |
| COLLAPSIBLE | back to summary |
|---|---|
| private static final CssMetaData<TitledPane, Boolean> COLLAPSIBLE | |
| STYLEABLES | back to summary |
|---|---|
| private static final List<CssMetaData<? extends Styleable, ?>> STYLEABLES | |
| StyleableProperties | back to summary |
|---|---|
| private StyleableProperties() | |