public class TitledPaneSkin extends LabeledSkinBase<TitledPane>
TitledPane
control.TitledPane
Type | Property and Description |
---|---|
private DoubleProperty |
transition
*
Properties *
*
|
Modifier and Type | Class and Description |
---|---|
(package private) class |
TitledPaneSkin.TitleRegion
*
Support classes *
*
|
Modifier and Type | Field and Description |
---|---|
private TitledPaneBehavior |
behavior
*
Private fields *
*
|
private static boolean |
CACHE_ANIMATION |
private Rectangle |
clipRect |
private Node |
content |
private StackPane |
contentContainer |
private HPos |
hpos |
private Pos |
pos |
private double |
prefHeightFromAccordion |
private Timeline |
timeline |
private TitledPaneSkin.TitleRegion |
titleRegion |
private DoubleProperty |
transition
*
Properties *
*
|
private static Duration |
TRANSITION_DURATION
*
Static fields *
*
|
private double |
transitionStartValue |
private VPos |
vpos |
ellipsisWidth, graphic, graphicPropertyChangedListener, invalidText, text, textWidth
Constructor and Description |
---|
TitledPaneSkin(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. |
Modifier and Type | Method and Description |
---|---|
protected double |
computeMaxWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
protected double |
computeMinHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
protected double |
computeMinWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset)
Compute and return the minimum width of this Labeled.
|
protected double |
computePrefHeight(double width,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
protected double |
computePrefWidth(double height,
double topInset,
double rightInset,
double bottomInset,
double leftInset) |
void |
dispose() |
private void |
doAnimationTransition() |
(package private) double |
getTitledPaneHeightForAccordion() |
(package private) double |
getTitleRegionSize(double width) |
private double |
getTransition() |
private boolean |
isInsideAccordion() |
protected void |
layoutChildren(double x,
double y,
double w,
double h)
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
|
private void |
setExpanded(boolean expanded) |
(package private) void |
setMaxTitledPaneHeightForAccordion(double height) |
private void |
setTransition(double value) |
private DoubleProperty |
transitionProperty()
*
Properties *
*
|
protected void |
updateChildren()
Updates the children managed by LabeledSkinBase, which can be the Labeled
graphic and/or a Text node.
|
private void |
updateClip()
*
Private implementation *
*
|
bottomLabelPadding, computeBaselineOffset, computeMaxHeight, isIgnoreGraphic, isIgnoreText, layoutLabelInArea, layoutLabelInArea, leftLabelPadding, mnemonicTargetChanged, queryAccessibleAttribute, rightLabelPadding, topLabelPadding, updateDisplayedText
private static final Duration TRANSITION_DURATION
private static final boolean CACHE_ANIMATION
private final TitledPaneBehavior behavior
private final TitledPaneSkin.TitleRegion titleRegion
private final StackPane contentContainer
private Node content
private Timeline timeline
private double transitionStartValue
private Rectangle clipRect
private Pos pos
private HPos hpos
private VPos vpos
private DoubleProperty transition
private double prefHeightFromAccordion
public TitledPaneSkin(TitledPane control)
children
list, as
well as the necessary input mappings for handling key, mouse, etc events.control
- The control that this skin should be installed onto.private final void setTransition(double value)
private final double getTransition()
private final DoubleProperty transitionProperty()
public void dispose()
protected void updateChildren()
updateChildren
in class LabeledSkinBase<TitledPane>
protected void layoutChildren(double x, double y, double w, double h)
layoutChildren
in class LabeledSkinBase<TitledPane>
protected double computeMinWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
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.
computeMinWidth
in class LabeledSkinBase<TitledPane>
protected double computeMinHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
computeMinHeight
in class LabeledSkinBase<TitledPane>
protected double computePrefWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
computePrefWidth
in class LabeledSkinBase<TitledPane>
protected double computePrefHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
computePrefHeight
in class LabeledSkinBase<TitledPane>
protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
computeMaxWidth
in class LabeledSkinBase<TitledPane>
private void updateClip()
private void setExpanded(boolean expanded)
private boolean isInsideAccordion()
double getTitleRegionSize(double width)
void setMaxTitledPaneHeightForAccordion(double height)
double getTitledPaneHeightForAccordion()
private void doAnimationTransition()