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

public Class SpinnerSkin<T>

extends SkinBase<Spinner<T>>
Class Inheritance
Type Parameters
<T>
the type of all values that can be iterated through in the Spinner
Imports
java.util.List, javafx.css.PseudoClass, javafx.geometry.HPos, .VPos, javafx.scene.AccessibleAction, .AccessibleRole, .Node, javafx.scene.control.Control, .SkinBase, .Spinner, .TextField, javafx.scene.input.KeyCode, .KeyEvent, javafx.scene.layout.Region, .StackPane, com.sun.javafx.scene.ParentHelper, com.sun.javafx.scene.control.FakeFocusTextField, .ListenerHelper, com.sun.javafx.scene.control.behavior.SpinnerBehavior, com.sun.javafx.scene.traversal.Algorithm, .Direction, .ParentTraversalEngine, .TraversalContext

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

Field Summary

Modifier and TypeField and Description
private static final int
private static final int
private static final int
private static final int
pack-priv final SpinnerBehavior<T>
private static PseudoClass
private Region
private StackPane
private Region
private StackPane
private int
private static final int
private static final int
private TextField

Constructor Summary

AccessConstructor and Description
public
SpinnerSkin(Spinner<T>
The control that this skin should be installed onto.
control
)

Creates a new SpinnerSkin 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
computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeBaselineOffset.

Calculates the baseline offset based on the first managed child.

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

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

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

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

Overrides javafx.scene.control.SkinBase.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.SkinBase.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.SkinBase.computeMinWidth.

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

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

Overrides javafx.scene.control.SkinBase.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.SkinBase.computePrefWidth.

Calculates the preferred width 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.

public void
install()

Overrides default javafx.scene.control.Skin.install.

Called once when Skin is set.

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

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

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

Field Detail

ARROWS_ON_LEFT_HORIZONTALback to summary
private static final int ARROWS_ON_LEFT_HORIZONTAL
ARROWS_ON_LEFT_VERTICALback to summary
private static final int ARROWS_ON_LEFT_VERTICAL
ARROWS_ON_RIGHT_HORIZONTALback to summary
private static final int ARROWS_ON_RIGHT_HORIZONTAL
ARROWS_ON_RIGHT_VERTICALback to summary
private static final int ARROWS_ON_RIGHT_VERTICAL
behaviorback to summary
pack-priv final SpinnerBehavior<T> behavior
CONTAINS_FOCUS_PSEUDOCLASS_STATEback to summary
private static PseudoClass CONTAINS_FOCUS_PSEUDOCLASS_STATE
decrementArrowback to summary
private Region decrementArrow
decrementArrowButtonback to summary
private StackPane decrementArrowButton
incrementArrowback to summary
private Region incrementArrow
incrementArrowButtonback to summary
private StackPane incrementArrowButton
layoutModeback to summary
private int layoutMode
SPLIT_ARROWS_HORIZONTALback to summary
private static final int SPLIT_ARROWS_HORIZONTAL
SPLIT_ARROWS_VERTICALback to summary
private static final int SPLIT_ARROWS_VERTICAL
textFieldback to summary
private TextField textField

Constructor Detail

SpinnerSkinback to summary
public SpinnerSkin(Spinner<T> control)

Creates a new SpinnerSkin 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:Spinner<T>

The control that this skin should be installed onto.

Method Detail

computeBaselineOffsetback to summary
protected double computeBaselineOffset(double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeBaselineOffset.

Doc from javafx.scene.control.SkinBase.computeBaselineOffset.

Calculates the baseline offset based on the first managed child. If there is no such child, returns Node#getBaselineOffset().

Annotations
@Override
computeMaxHeightback to summary
protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)

Overrides javafx.scene.control.SkinBase.computeMaxHeight.

Doc from javafx.scene.control.SkinBase.computeMaxHeight.

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

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

Overrides javafx.scene.control.SkinBase.computeMaxWidth.

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

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

Doc from javafx.scene.control.SkinBase.computeMinWidth.

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

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.

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

Overrides javafx.scene.control.SkinBase.computePrefWidth.

Doc from javafx.scene.control.SkinBase.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.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
installback to summary
public void install()

Overrides default javafx.scene.control.Skin.install.

Doc from javafx.scene.control.Skin.install.

Called once when Skin is set. This method is called after the previous skin, if any, has been uninstalled via its dispose() method. The skin can now safely make changes to its associated control, like registering listeners, adding child nodes, and modifying properties and event handlers.

Application code must not call this method.

The default implementation of this method does nothing.

Annotations
@Override
isIncDecKeyEventback to summary
private boolean isIncDecKeyEvent(KeyEvent ke)
layoutChildrenback to summary
protected void layoutChildren(final double x, final 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.

Annotations
@Override
updateStyleClassback to summary
private void updateStyleClass()