Class TitledPane
- All Implemented Interfaces:
LayoutMeasurable
,LayoutMeasurableMixin
,HasAlignmentProperty
,HasBackgroundProperty
,HasBlendModeProperty
,HasBorderProperty
,HasClipProperty
,HasEffectProperty
,HasFontProperty
,HasGraphicProperty
,HasHeightProperty
,HasImageUrlProperty
,HasLayoutXProperty
,HasLayoutYProperty
,HasManagedProperty
,HasMaxHeightProperty
,HasMaxWidthProperty
,HasMinHeightProperty
,HasMinWidthProperty
,HasMouseTransparentProperty
,HasOnMouseClickedProperty
,HasOpacityProperty
,HasPaddingProperty
,HasParentProperty
,HasPrefHeightProperty
,HasPrefWidthProperty
,HasSnapToPixelProperty
,HasTextAlignmentProperty
,HasTextFillProperty
,HasTextProperty
,HasVisibleProperty
,HasWidthProperty
,Styleable
,EventTarget
,Skinnable
,INode
,PreferenceResizableNode
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 StackPane
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"));
- Since:
- JavaFX 2.0
-
Property Summary
TypePropertyDescriptionfinal BooleanProperty
The animated state of the TitledPane.final BooleanProperty
The collapsible state of the TitledPane.final ObjectProperty<Node>
The content of the TitledPane.final BooleanProperty
The expanded state of the TitledPane.Properties inherited from class javafx.scene.control.Labeled
alignment, contentDisplay, ellipsisString, font, graphic, graphicTextGap, imageUrl, labelPadding, lineSpacing, textAlignment, textFill, textOverrun, text, wrapText
Properties inherited from class javafx.scene.control.Control
contextMenu, skin
Properties inherited from class javafx.scene.layout.Region
background, border, height, insets, maxHeight, maxWidth, minHeight, minWidth, padding, prefHeight, prefWidth, snapToPixel, width
Properties inherited from class javafx.scene.Parent
needsLayout
Properties inherited from class javafx.scene.Node
blendMode, cacheHint, cache, clip, cursor, disabled, disable, effect, eventDispatcher, focused, focusTraversable, hover, id, layoutBounds, layoutX, layoutY, managed, mouseTransparent, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragged, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onScroll, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, opacity, parent, pressed, rotate, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, visible
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBlendModeProperty
blendMode
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasClipProperty
clip
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasEffectProperty
effect
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutXProperty
layoutX
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutYProperty
layoutY
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasManagedProperty
managed
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMouseTransparentProperty
mouseTransparent
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOnMouseClickedProperty
onMouseClicked
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOpacityProperty
opacity
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasParentProperty
parent
Properties inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasVisibleProperty
visible
-
Field Summary
Fields inherited from interface javafx.scene.INode
BASELINE_OFFSET_SAME_AS_HEIGHT
Fields inherited from interface javafx.scene.layout.PreferenceResizableNode
USE_COMPUTED_SIZE, USE_PREF_SIZE
-
Constructor Summary
ConstructorDescriptionCreates a new TitledPane with no title or content.TitledPane
(String title, Node content) Creates a new TitledPane with a title and content. -
Method Summary
Modifier and TypeMethodDescriptionfinal BooleanProperty
The animated state of the TitledPane.final BooleanProperty
The collapsible state of the TitledPane.final ObjectProperty<Node>
The content of the TitledPane.protected Skin<?>
Create a new instance of the default skin for this control.final BooleanProperty
The expanded state of the TitledPane.final Node
The content of the TitledPane.final boolean
Returns the animated state of the TitledPane.final boolean
Returns the collapsible state of the TitlePane.final boolean
Gets the value of theexpanded
property.final void
setAnimated
(boolean value) Specifies how the TitledPane should open and close.final void
setCollapsible
(boolean value) Specifies if the TitledPane can be collapsed.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.final void
setExpanded
(boolean value) Sets the expanded state of the TitledPane.Methods inherited from class javafx.scene.control.Labeled
alignmentProperty, contentDisplayProperty, ellipsisStringProperty, fontProperty, getContentBias, getContentDisplay, getEllipsisString, getGraphicTextGap, getLabelPadding, getLineSpacing, getTextOverrun, graphicProperty, graphicTextGapProperty, imageUrlProperty, isWrapText, labelPaddingProperty, lineSpacingProperty, setContentDisplay, setEllipsisString, setGraphicTextGap, setLineSpacing, setScene, setTextOverrun, setWrapText, textAlignmentProperty, textFillProperty, textOverrunProperty, textProperty, wrapTextProperty
Methods inherited from class javafx.scene.control.Control
computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, contextMenuProperty, getBaselineOffset, getContextMenu, getSkin, layoutChildren, setContextMenu, setSkin, shouldUseLayoutMeasurable, skinProperty
Methods inherited from class javafx.scene.layout.Region
backgroundProperty, borderProperty, boundedSize, getInsets, heightProperty, impl_computeGeomBounds, impl_computeLayoutBounds, impl_maxHeight, impl_maxWidth, impl_minHeight, impl_minWidth, impl_prefHeight, impl_prefWidth, insetsProperty, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeightProperty, maxWidthProperty, minHeightProperty, minWidthProperty, paddingProperty, positionInArea, positionInArea, prefHeightProperty, prefWidthProperty, resize, setMaxSize, setMinSize, setPrefSize, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
Methods inherited from class javafx.scene.Parent
getChildren, getChildrenUnmodifiable, getManagedChildren, isNeedsLayout, layout, needsLayoutProperty, requestLayout, requestParentLayout, setLayoutFlag, setNeedsLayout, setSceneRoot
Methods inherited from class javafx.scene.Node
addEventFilter, addEventHandler, autosize, blendModeProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, createLayoutMeasurable, cursorProperty, disabledProperty, disableProperty, effectProperty, eventDispatcherProperty, fireEvent, focusedProperty, focusTraversableProperty, getAllNodeTransforms, getBoundsInLocal, getCacheHint, getCursor, getEventDispatcher, getId, getLayoutMeasurable, getNodePeer, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseDragged, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnScroll, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOrCreateAndBindNodePeer, getProperties, getRotate, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleClass, getTransforms, getTranslateX, getTranslateY, getUserData, hasProperties, hoverProperty, idProperty, impl_getLayoutBounds, impl_isTreeVisible, impl_traverse, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isPressed, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToScene, localToScene, localToScreen, localToScreen, localToScreen, localToScreen, managedProperty, mouseTransparentProperty, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDraggedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onNodePeerReady, onPeerSizeChanged, onScrollProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, opacityProperty, parentProperty, parentToLocal, pressedProperty, removeEventFilter, removeEventHandler, requestFocus, requestPeerFocus, rotateProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, setCache, setCacheHint, setCursor, setDisable, setDisabled, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setNodePeer, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseDragged, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnScroll, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setPressed, setRotate, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setUserData, snapshot, startDragAndDrop, styleProperty, toBack, toFront, translateXProperty, translateYProperty, visibleProperty
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasAlignmentProperty
getAlignment, setAlignment
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBackgroundProperty
getBackground, setBackground
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBlendModeProperty
blendModeProperty, getBlendMode, setBlendMode
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasBorderProperty
getBorder, setBorder
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasClipProperty
clipProperty, getClip, setClip
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasEffectProperty
effectProperty, getEffect, setEffect
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasFontProperty
getFont, setFont
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasGraphicProperty
getGraphic, setGraphic
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasHeightProperty
getHeight, setHeight
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasImageUrlProperty
getImageUrl, setImageUrl
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutXProperty
getLayoutX, layoutXProperty, setLayoutX
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasLayoutYProperty
getLayoutY, layoutYProperty, setLayoutY
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasManagedProperty
isManaged, managedProperty, setManaged
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMaxHeightProperty
getMaxHeight, setMaxHeight
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMaxWidthProperty
getMaxWidth, setMaxWidth
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMinHeightProperty
getMinHeight, setMinHeight
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMinWidthProperty
getMinWidth, setMinWidth
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasMouseTransparentProperty
isMouseTransparent, mouseTransparentProperty, setMouseTransparent
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOnMouseClickedProperty
getOnMouseClicked, onMouseClickedProperty, setOnMouseClicked
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasOpacityProperty
getOpacity, opacityProperty, setOpacity
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasPaddingProperty
getPadding, setPadding
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasParentProperty
getParent, parentProperty, setParent
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasPrefHeightProperty
getPrefHeight, setPrefHeight
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasPrefWidthProperty
getPrefWidth, setPrefWidth
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasSnapToPixelProperty
isSnapToPixel, setSnapToPixel
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasTextAlignmentProperty
getTextAlignment, setTextAlignment
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasTextFillProperty
getTextFill, setTextFill
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasTextProperty
getText, setText
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasVisibleProperty
isVisible, setVisible, visibleProperty
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.markers.HasWidthProperty
getWidth, setWidth
Methods inherited from interface javafx.scene.INode
autosize, getAllNodeTransforms, getNodePeer, getOrCreateAndBindNodePeer, getProperties, getScene, getTransforms, hasProperties, relocate, resizeRelocate
Methods inherited from interface dev.webfx.kit.mapper.peers.javafxgraphics.emul_coupling.LayoutMeasurableMixin
clearCache, getLayoutBounds, getLayoutMeasurable, maxHeight, maxWidth, minHeight, minWidth, prefHeight, prefWidth
Methods inherited from interface javafx.scene.layout.PreferenceResizableNode
isResizable
-
Property Details
-
content
The content of the TitledPane.- See Also:
-
expanded
The expanded state of the TitledPane. -
animated
The animated state of the TitledPane. -
collapsible
The collapsible state of the TitledPane.
-
-
Constructor Details
-
TitledPane
public TitledPane()Creates a new TitledPane with no title or content. -
TitledPane
Creates a new TitledPane with a title and content.- Parameters:
title
- The title of the TitledPane.content
- The content of the TitledPane.
-
-
Method Details
-
setContent
The content of the TitlePane which can be any Node such as UI controls or groups of nodes added to a layout container.
- Parameters:
value
- The content for this TitlePane.
-
getContent
The content of the TitledPane.Null
is returned when if there is no content.- Returns:
- The content of this TitledPane.
-
contentProperty
The content of the TitledPane.- Returns:
- The content of the TitlePane.
-
setExpanded
public final void setExpanded(boolean value) Sets the expanded state of the TitledPane. The default istrue
. -
isExpanded
public final boolean isExpanded()Gets the value of theexpanded
property.- Property description:
- The expanded state of the TitledPane.
- Returns:
- the value of the
expanded
property - See Also:
-
expandedProperty
The expanded state of the TitledPane.- Returns:
- the
expanded
property - See Also:
-
setAnimated
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 totrue
. The default istrue
. -
isAnimated
public final boolean isAnimated()Returns the animated state of the TitledPane.- Returns:
- The animated state of the TitledPane.
-
animatedProperty
The animated state of the TitledPane.- Returns:
- the
animated
property - See Also:
-
setCollapsible
public final void setCollapsible(boolean value) Specifies if the TitledPane can be collapsed. The default istrue
. -
isCollapsible
public final boolean isCollapsible()Returns the collapsible state of the TitlePane.- Returns:
- The collapsible state of the TitledPane.
-
collapsibleProperty
The collapsible state of the TitledPane.- Returns:
- the
collapsible
property - See Also:
-
createDefaultSkin
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-fx-skin
or set explicitly in a sub-class withsetSkin(...)
.- Overrides:
createDefaultSkin
in classControl
- Returns:
- new instance of default skin for this control. If null then the control will have no skin unless one is provided by css.
-