APIdia Launch Partner
Top Description Inners Fields Constructors Methods
javafx.scene.control.skin

public Class ScrollBarSkin

extends SkinBase<ScrollBar>
Class Inheritance
Imports
javafx.geometry.Orientation, .Point2D, javafx.scene.AccessibleAction, .AccessibleAttribute, .AccessibleRole, .Node, javafx.scene.control.Control, .ScrollBar, .SkinBase, javafx.scene.input.MouseButton, .ScrollEvent, javafx.scene.layout.Region, .StackPane, com.sun.javafx.scene.control.ListenerHelper, .Properties, com.sun.javafx.scene.control.behavior.ScrollBarBehavior, com.sun.javafx.util.Utils

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

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final ScrollBarBehavior
private ScrollBarSkin.EndButton
private Point2D
private ScrollBarSkin.EndButton
private double
private StackPane
private double
private StackPane
private StackPane
private double
private double

Constructor Summary

AccessConstructor and Description
public
ScrollBarSkin(ScrollBar
The control that this skin should be installed onto.
control
)

Creates a new ScrollBarSkin 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
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 height, 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.

pack-priv double
private Node
private Node
private Node
private Node
private void
initialize()

Initializes the ScrollBarSkin.

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.

pack-priv double
pack-priv double
pack-priv void
positionThumb()

Called when ever either min, max or value changes, so thumb's layoutX, Y is recomputed.

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetconsumeMouseEventsexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

behaviorback to summary
private final ScrollBarBehavior behavior
decButtonback to summary
private ScrollBarSkin.EndButton decButton
dragStartback to summary
private Point2D dragStart
incButtonback to summary
private ScrollBarSkin.EndButton incButton
preDragThumbPosback to summary
private double preDragThumbPos
thumbback to summary
private StackPane thumb
thumbLengthback to summary
private double thumbLength
trackback to summary
private StackPane track
trackBackgroundback to summary
private StackPane trackBackground
trackLengthback to summary
private double trackLength
trackPosback to summary
private double trackPos

Constructor Detail

ScrollBarSkinback to summary
public ScrollBarSkin(ScrollBar control)

Creates a new ScrollBarSkin 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:ScrollBar

The control that this skin should be installed onto.

Method Detail

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 height, 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
getBreadthback to summary
pack-priv double getBreadth()
getDecrementButtonback to summary
private Node getDecrementButton()
getIncrementButtonback to summary
private Node getIncrementButton()
getThumbback to summary
private Node getThumb()
getTrackback to summary
private Node getTrack()
initializeback to summary
private void initialize()

Initializes the ScrollBarSkin. Creates the scene and sets up all the bindings for the group.

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
minThumbLengthback to summary
pack-priv double minThumbLength()
minTrackLengthback to summary
pack-priv double minTrackLength()
positionThumbback to summary
pack-priv void positionThumb()

Called when ever either min, max or value changes, so thumb's layoutX, Y is recomputed.

javafx.scene.control.skin back to summary

private Class ScrollBarSkin.EndButton

extends Region
Class Inheritance

Field Summary

Modifier and TypeField and Description
private Region
Inherited from javafx.scene.layout.Region:
USE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
private
EndButton(String styleClass, String arrowStyleClass)

Method Summary

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

Overrides javafx.scene.layout.Region.computeMinHeight.

Computes the minimum height of this region.

protected double
computeMinWidth(double height)

Overrides javafx.scene.layout.Region.computeMinWidth.

Computes the minimum width of this region.

protected double
computePrefHeight(double width)

Overrides 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.

protected double
computePrefWidth(double height)

Overrides javafx.scene.layout.Region.computePrefWidth.

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

protected void
layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

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

Inherited from javafx.scene.layout.Region:
backgroundPropertyborderPropertycacheShapePropertycenterShapePropertycomputeMaxHeightcomputeMaxWidthgetBackgroundgetBordergetClassCssMetaDatagetCssMetaDatagetHeightgetInsetsgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetOpaqueInsetsgetPaddinggetPrefHeightgetPrefWidthgetShapegetUserAgentStylesheetgetWidthheightPropertyinsetsPropertyisCacheShapeisCenterShapeisResizableisScaleShapeisSnapToPixellayoutInArealayoutInArealayoutInArealayoutInAreamaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyopaqueInsetsPropertypaddingPropertypositionInAreapositionInAreaprefHeightprefHeightPropertyprefWidthprefWidthPropertyresizescaleShapePropertysetBackgroundsetBordersetCacheShapesetCenterShapesetHeightsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetOpaqueInsetssetPaddingsetPrefHeightsetPrefSizesetPrefWidthsetScaleShapesetShapesetSnapToPixelsetWidthshapePropertysnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYsnapToPixelPropertywidthProperty

Field Detail

arrowback to summary
private Region arrow

Constructor Detail

EndButtonback to summary
private EndButton(String styleClass, String arrowStyleClass)

Method Detail

computeMinHeightback to summary
protected double computeMinHeight(double width)

Overrides javafx.scene.layout.Region.computeMinHeight.

Doc from javafx.scene.layout.Region.computeMinHeight.

Computes the minimum height of this region. Returns the sum of the top and bottom insets by default. 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
computeMinWidthback to summary
protected double computeMinWidth(double height)

Overrides javafx.scene.layout.Region.computeMinWidth.

Doc from javafx.scene.layout.Region.computeMinWidth.

Computes the minimum width of this region. Returns the sum of the left and right insets by default. 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
computePrefHeightback to summary
protected double computePrefHeight(double width)

Overrides javafx.scene.layout.Region.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.Region.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.Parent.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