Top Description Inners Fields Constructors Methods
javafx.scene.control.skin

public Class TitledPaneSkin

extends LabeledSkinBase<TitledPane>
Class Inheritance
Imports
javafx.animation.Animation.Status, .Interpolator, .KeyFrame, .KeyValue, .Timeline, javafx.application.Platform, javafx.beans.binding.DoubleBinding, javafx.beans.property.DoubleProperty, .SimpleDoubleProperty, javafx.geometry.HPos, .Pos, .VPos, javafx.scene.Cursor, .Node, javafx.scene.control.Accordion, .ContentDisplay, .ContextMenu, .Control, .TitledPane, javafx.scene.input.MouseButton, javafx.scene.layout.StackPane, javafx.scene.shape.Rectangle, javafx.util.Duration, com.sun.javafx.PlatformUtil, com.sun.javafx.scene.control.behavior.TitledPaneBehavior

Default skin implementation for the TitledPane control.
Since
9
See Also
TitledPane

Nested and Inner Type Summary

Modifier and TypeClass and Description
pack-priv class

Field Summary

Modifier and TypeField and Description
private final TitledPaneBehavior
private static final boolean
private Rectangle
private Node
private final StackPane
private Pos
private double
private Timeline
private final TitledPaneSkin.TitleRegion
private DoubleProperty
private static final Duration
private double
Inherited from javafx.scene.control.skin.LabeledSkinBase:
ellipsisWidthgraphicgraphicPropertyChangedListenerinvalidTexttexttextWidth

Constructor Summary

AccessConstructor and Description
public
TitledPaneSkin(final TitledPane
The control that this skin should be installed onto.
control
)

Creates a new TitledPaneSkin instance, installing the necessary child nodes into the Control children list, as well as the necessary input mappings for handling key, mouse, etc events.

Method Summary

Modifier and TypeMethod and Description
pack-priv double
protected double
computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMaxWidth.

Computes the maximum allowable width of the Skin, based on the provided height.

protected double
computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

protected double
computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinWidth.

Compute and return the minimum width of this Labeled.

protected double
computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

protected double
computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase.

public void
dispose()

Overrides javafx.scene.control.skin.LabeledSkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

private void
pack-priv double
pack-priv double
getTitleRegionSize(double width)

private final double
private boolean
protected void
layoutChildren(final double x, double y, final double w, final double h)

Overrides javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

The Layout algorithm works like this: - Get the labeled w/h, graphic w/h, text w/h - Compute content w/h based on graphicVPos, graphicHPos, graphicTextGap, and graphic w/h and text w/h - (Note that the text content has been pre-truncated where necessary) - compute content x/y based on content w/h and labeled w/h and the labeled's hpos and vpos - position the graphic and text

pack-priv double
pack-priv double
private void
setExpanded(boolean expanded)

pack-priv void
private final void
setTransition(double value)

pack-priv double
private final DoubleProperty
protected void
updateChildren()

Overrides javafx.scene.control.skin.LabeledSkinBase.updateChildren.

Updates the children managed by LabeledSkinBase, which can be the Labeled graphic and/or a Text node.

private void
Inherited from javafx.scene.control.skin.LabeledSkinBase:
computeBaselineOffsetcomputeMaxHeightisIgnoreGraphicisIgnoreTextlayoutLabelInArealayoutLabelInAreamnemonicTargetChangedqueryAccessibleAttributeupdateDisplayedText

Field Detail

behaviorback to summary
private final TitledPaneBehavior behavior
CACHE_ANIMATIONback to summary
private static final boolean CACHE_ANIMATION
clipRectback to summary
private Rectangle clipRect
contentback to summary
private Node content
contentContainerback to summary
private final StackPane contentContainer
posback to summary
private Pos pos
prefHeightFromAccordionback to summary
private double prefHeightFromAccordion
timelineback to summary
private Timeline timeline
titleRegionback to summary
private final TitledPaneSkin.TitleRegion titleRegion
transitionback to summary
private DoubleProperty transition
TRANSITION_DURATIONback to summary
private static final Duration TRANSITION_DURATION
transitionStartValueback to summary
private double transitionStartValue

Constructor Detail

TitledPaneSkinback to summary
public TitledPaneSkin(final TitledPane control)

Creates a new TitledPaneSkin instance, installing the necessary child nodes into the Control children list, as well as the necessary input mappings for handling key, mouse, etc events.

Parameters
control:TitledPane

The control that this skin should be installed onto.

Method Detail

bottomLabelPaddingback to summary
pack-priv double bottomLabelPadding()

Overrides javafx.scene.control.skin.LabeledSkinBase.bottomLabelPadding.

Annotations
@Override
computeMaxWidthback to summary
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMaxWidth.

Doc from javafx.scene.control.skin.LabeledSkinBase.computeMaxWidth.

Computes the maximum allowable width of the Skin, based on the provided height.

Annotations
@Override
computeMinHeightback to summary
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Doc from javafx.scene.control.skin.LabeledSkinBase.computeMinHeight.

Computes the minimum allowable height of the Skin, based on the provided width.

Annotations
@Override
computeMinWidthback to summary
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computeMinWidth.

Doc from javafx.scene.control.skin.LabeledSkinBase.computeMinWidth.

Compute and return the minimum width of this Labeled. The minimum width is the smaller of the width of "..." and the width with the actual text. In this way, if the text width itself is smaller than the ellipsis then we should use that as the min width, otherwise the ellipsis needs to be the min width.

We use the same calculation here regardless of whether we are talking about a single or multiline labeled. So a multiline labeled may find that the width of the "..." is as small as it will ever get.

Annotations
@Override
computePrefHeightback to summary
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Doc from javafx.scene.control.skin.LabeledSkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase. The default implementation calculates this height as the height of the area occupied by its managed children when they are positioned at their current positions at their preferred heights.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Doc from javafx.scene.control.skin.LabeledSkinBase.computePrefWidth.

Calculates the preferred width of this SkinBase. The default implementation calculates this width as the width of the area occupied by its managed children when they are positioned at their current positions at their preferred widths.

Annotations
@Override
disposeback to summary
public void dispose()

Overrides javafx.scene.control.skin.LabeledSkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Annotations
@Override
doAnimationTransitionback to summary
private void doAnimationTransition()
getTitledPaneHeightForAccordionback to summary
pack-priv double getTitledPaneHeightForAccordion()
getTitleRegionSizeback to summary
pack-priv double getTitleRegionSize(double width)
getTransitionback to summary
private final double getTransition()
isInsideAccordionback to summary
private boolean isInsideAccordion()
layoutChildrenback to summary
protected void layoutChildren(final double x, double y, final double w, final double h)

Overrides javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

Doc from javafx.scene.control.skin.LabeledSkinBase.layoutChildren.

The Layout algorithm works like this: - Get the labeled w/h, graphic w/h, text w/h - Compute content w/h based on graphicVPos, graphicHPos, graphicTextGap, and graphic w/h and text w/h - (Note that the text content has been pre-truncated where necessary) - compute content x/y based on content w/h and labeled w/h and the labeled's hpos and vpos - position the graphic and text

Annotations
@Override
leftLabelPaddingback to summary
pack-priv double leftLabelPadding()

Overrides javafx.scene.control.skin.LabeledSkinBase.leftLabelPadding.

Annotations
@Override
rightLabelPaddingback to summary
pack-priv double rightLabelPadding()

Overrides javafx.scene.control.skin.LabeledSkinBase.rightLabelPadding.

Annotations
@Override
setExpandedback to summary
private void setExpanded(boolean expanded)
setMaxTitledPaneHeightForAccordionback to summary
pack-priv void setMaxTitledPaneHeightForAccordion(double height)
setTransitionback to summary
private final void setTransition(double value)
topLabelPaddingback to summary
pack-priv double topLabelPadding()

Overrides javafx.scene.control.skin.LabeledSkinBase.topLabelPadding.

Annotations
@Override
transitionPropertyback to summary
private final DoubleProperty transitionProperty()
updateChildrenback to summary
protected void updateChildren()

Overrides javafx.scene.control.skin.LabeledSkinBase.updateChildren.

Doc from javafx.scene.control.skin.LabeledSkinBase.updateChildren.

Updates the children managed by LabeledSkinBase, which can be the Labeled graphic and/or a Text node. Only those nodes which actually must be used are used. For example, with a ContentDisplay of GRAPHIC_ONLY the text node is not added, and with a ContentDisplay of TEXT_ONLY, the graphic is not added.

Annotations
@Override
updateClipback to summary
private void updateClip()
javafx.scene.control.skin back to summary

pack-priv Class TitledPaneSkin.TitleRegion

extends StackPane
Class Inheritance

Field Summary

Modifier and TypeField and Description
private final StackPane

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
protected double
computePrefHeight(double width)

Overrides javafx.scene.layout.StackPane.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy.

protected double
computePrefWidth(double height)

Overrides javafx.scene.layout.StackPane.computePrefWidth.

Computes the preferred width of this region for the given height.

protected void
layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Invoked during the layout pass to layout the children in this Parent.

private void
Inherited from javafx.scene.layout.StackPane:
alignmentPropertyclearConstraintscomputeMinHeightcomputeMinWidthgetAlignmentgetAlignmentgetClassCssMetaDatagetContentBiasgetCssMetaDatagetMarginrequestLayoutsetAlignmentsetAlignmentsetMargin

Field Detail

arrowRegionback to summary
private final StackPane arrowRegion

Constructor Detail

TitleRegionback to summary
public TitleRegion()

Method Detail

computePrefHeightback to summary
protected double computePrefHeight(double width)

Overrides javafx.scene.layout.StackPane.computePrefHeight.

Doc from javafx.scene.layout.Region.computePrefHeight.

Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a HORIZONTAL content bias, then the width parameter can be ignored.

Annotations
@Override
computePrefWidthback to summary
protected double computePrefWidth(double height)

Overrides javafx.scene.layout.StackPane.computePrefWidth.

Doc from javafx.scene.layout.Region.computePrefWidth.

Computes the preferred width of this region for the given height. Region subclasses should override this method to return an appropriate value based on their content and layout strategy. If the subclass doesn't have a VERTICAL content bias, then the height parameter can be ignored.

Annotations
@Override
layoutChildrenback to summary
protected void layoutChildren()

Overrides javafx.scene.layout.StackPane.layoutChildren.

Doc from javafx.scene.Parent.layoutChildren.

Invoked during the layout pass to layout the children in this Parent. By default it will only set the size of managed, resizable content to their preferred sizes and does not do any node positioning.

Subclasses should override this function to layout content as needed.

Annotations
@Override
updateback to summary
private void update()