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

public Class AccordionSkin

extends SkinBase<Accordion>
Class Inheritance
Imports
java.util.HashMap, .List, .Map, javafx.beans.value.ChangeListener, javafx.scene.Node, javafx.scene.control.Accordion, .Control, .Skin, .SkinBase, .TitledPane, javafx.scene.shape.Rectangle, com.sun.javafx.scene.control.ListenerHelper, com.sun.javafx.scene.control.behavior.AccordionBehavior, .BehaviorBase

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

Field Summary

Modifier and TypeField and Description
private final BehaviorBase<Accordion>
private Rectangle
private TitledPane
private TitledPane
private boolean
private Map<TitledPane, ChangeListener<Boolean>>
private double
private TitledPane
private boolean

Constructor Summary

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

Creates a new AccordionSkin 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
protected double
computeMinHeight(double
The width of the Skin, in case this value might dictate the minimum height.
width
,
double
the pixel snapped top inset
topInset
,
double
the pixel snapped right inset
rightInset
,
double
the pixel snapped bottom inset
bottomInset
,
double
the pixel snapped left inset
leftInset
)

Overrides javafx.scene.control.SkinBase.computeMinHeight.

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

protected double
computePrefHeight(double
the width that should be used if preferred height depends on it
width
,
double
the pixel snapped top inset
topInset
,
double
the pixel snapped right inset
rightInset
,
double
the pixel snapped bottom inset
bottomInset
,
double
the pixel snapped left inset
leftInset
)

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Calculates the preferred height of this SkinBase.

public void
dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

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

private ChangeListener<Boolean>
private void
protected void
layoutChildren(final double
the x position
x
,
double
the y position
y
,
final double
the width
w
,
final double
the height
h
)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

private void
Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthcomputeMinWidthcomputePrefWidthconsumeMouseEventsexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

behaviorback to summary
private final BehaviorBase<Accordion> behavior
clipRectback to summary
private Rectangle clipRect
expandedPaneback to summary
private TitledPane expandedPane
firstTitledPaneback to summary
private TitledPane firstTitledPane
forceRelayoutback to summary
private boolean forceRelayout
listenersback to summary
private Map<TitledPane, ChangeListener<Boolean>> listeners
previousHeightback to summary
private double previousHeight
previousPaneback to summary
private TitledPane previousPane
relayoutback to summary
private boolean relayout

Constructor Detail

AccordionSkinback to summary
public AccordionSkin(final Accordion control)

Creates a new AccordionSkin 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:Accordion

The control that this skin should be installed onto.

Method Detail

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

Overrides javafx.scene.control.SkinBase.computeMinHeight.

Doc from javafx.scene.control.SkinBase.computeMinHeight.

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

Parameters
width:double

The width of the Skin, in case this value might dictate the minimum height.

topInset:double

the pixel snapped top inset

rightInset:double

the pixel snapped right inset

bottomInset:double

the pixel snapped bottom inset

leftInset:double

the pixel snapped left inset

Returns:double

A double representing the minimum height of this Skin.

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

Overrides javafx.scene.control.SkinBase.computePrefHeight.

Doc from javafx.scene.control.SkinBase.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.

Parameters
width:double

the width that should be used if preferred height depends on it

topInset:double

the pixel snapped top inset

rightInset:double

the pixel snapped right inset

bottomInset:double

the pixel snapped bottom inset

leftInset:double

the pixel snapped left inset

Returns:double

the calculated preferred height

Annotations
@Override
disposeback to summary
public void dispose()

Overrides javafx.scene.control.SkinBase.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
expandedPropertyListenerback to summary
private ChangeListener<Boolean> expandedPropertyListener(final TitledPane tp)
initTitledPaneListenersback to summary
private void initTitledPaneListeners(List<? extends TitledPane> list)
layoutChildrenback to summary
protected void layoutChildren(final double x, double y, final double w, final double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Doc from javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

Parameters
x:double

the x position

y:double

the y position

w:double

the width

h:double

the height

Annotations
@Override
removeTitledPaneListenersback to summary
private void removeTitledPaneListeners(List<? extends TitledPane> list)