Top Fields Constructors Methods
org.fxmisc.flowless

public Class VirtualizedScrollPane<V extends Region & Virtualized>

extends Region
implements Virtualized
Class Inheritance
All Implemented Interfaces
org.fxmisc.flowless.Virtualized
Annotations
@DefaultProperty:content
Static Imports
javafx.scene.control.ScrollPane.ScrollBarPolicy.*

Field Summary

Modifier and TypeField and Description
private final V
private static final PseudoClass
private final ChangeListener<Boolean>
private final ScrollBar
private final Var<ScrollPane.ScrollBarPolicy>
hbarPolicy

The Policy for the Horizontal ScrollBar

private Var<Double>
private final ChangeListener<Double>
private Var<Double>
private ChangeListener<Double>
private final ScrollBar
private final Var<ScrollPane.ScrollBarPolicy>
vbarPolicy

The Policy for the Vertical ScrollBar

private Var<Double>
private final ChangeListener<Double>
private Var<Double>
private final ChangeListener<Double>
Inherited from javafx.scene.layout.Region:
USE_COMPUTED_SIZEUSE_PREF_SIZE

Constructor Summary

AccessConstructor and Description
public
VirtualizedScrollPane(V content, ScrollPane.ScrollBarPolicy hPolicy, ScrollPane.ScrollBarPolicy vPolicy)

Constructs a VirtualizedScrollPane with the given content and policies

public
VirtualizedScrollPane(V content)

Constructs a VirtualizedScrollPane that only displays its horizontal and vertical scroll bars as needed

Method Summary

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

Overrides javafx.scene.layout.Region.computeMaxHeight.

Computes the maximum height of this region.

protected double
computeMaxWidth(double height)

Overrides javafx.scene.layout.Region.computeMaxWidth.

Computes the maximum width for this region.

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.

private void
public Var<Double>
public Var<Double>
public V

Returns:

- the content
getContent
()

Does not unbind scrolling from Content before returning Content.

public final ScrollPane.ScrollBarPolicy
public final ScrollPane.ScrollBarPolicy
public final Var<ScrollPane.ScrollBarPolicy>
protected void
layoutChildren()

Overrides javafx.scene.Parent.layoutChildren.

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

private static double
offsetToScrollbarPosition(double contentOffset, double viewportSize, double padding, double contentSize)

public V

Returns:

- the content
removeContent
()

Unbinds scrolling from Content before returning Content.

private static double
scrollbarPositionToOffset(double scrollbarPos, double viewportSize, double padding, double contentSize)

public void
scrollXBy(double deltaX)

Implements org.fxmisc.flowless.Virtualized.scrollXBy.

Scroll the content horizontally by the given amount.

public void
scrollXToPixel(double pixel)

Implements org.fxmisc.flowless.Virtualized.scrollXToPixel.

Scroll the content horizontally to the pixel

public void
scrollYBy(double deltaY)

Implements org.fxmisc.flowless.Virtualized.scrollYBy.

Scroll the content vertically by the given amount.

public void
scrollYToPixel(double pixel)

Implements org.fxmisc.flowless.Virtualized.scrollYToPixel.

Scroll the content vertically to the pixel

public final void
private void
setHPosition(double pos)

private static void
public final void
private void
setVPosition(double pos)

public Val<Double>
public Val<Double>
private void
public final Var<ScrollPane.ScrollBarPolicy>
Inherited from javafx.scene.layout.Region:
backgroundPropertyborderPropertycacheShapePropertycenterShapePropertygetBackgroundgetBordergetClassCssMetaDatagetCssMetaDatagetHeightgetInsetsgetMaxHeightgetMaxWidthgetMinHeightgetMinWidthgetOpaqueInsetsgetPaddinggetPrefHeightgetPrefWidthgetShapegetUserAgentStylesheetgetWidthheightPropertyinsetsPropertyisCacheShapeisCenterShapeisResizableisScaleShapeisSnapToPixellayoutInArealayoutInArealayoutInArealayoutInAreamaxHeightmaxHeightPropertymaxWidthmaxWidthPropertyminHeightminHeightPropertyminWidthminWidthPropertyopaqueInsetsPropertypaddingPropertypositionInAreapositionInAreaprefHeightprefHeightPropertyprefWidthprefWidthPropertyresizescaleShapePropertysetBackgroundsetBordersetCacheShapesetCenterShapesetHeightsetMaxHeightsetMaxSizesetMaxWidthsetMinHeightsetMinSizesetMinWidthsetOpaqueInsetssetPaddingsetPrefHeightsetPrefSizesetPrefWidthsetScaleShapesetShapesetSnapToPixelsetWidthshapePropertysnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYsnapToPixelPropertywidthProperty

Field Detail

contentback to summary
private final V content
CONTENT_FOCUSEDback to summary
private static final PseudoClass CONTENT_FOCUSED
contentFocusedListenerback to summary
private final ChangeListener<Boolean> contentFocusedListener
hbarback to summary
private final ScrollBar hbar
hbarPolicyback to summary
private final Var<ScrollPane.ScrollBarPolicy> hbarPolicy

The Policy for the Horizontal ScrollBar

hbarValueback to summary
private Var<Double> hbarValue
hbarValueListenerback to summary
private final ChangeListener<Double> hbarValueListener
hPosEstimateback to summary
private Var<Double> hPosEstimate
hPosEstimateListenerback to summary
private ChangeListener<Double> hPosEstimateListener
vbarback to summary
private final ScrollBar vbar
vbarPolicyback to summary
private final Var<ScrollPane.ScrollBarPolicy> vbarPolicy

The Policy for the Vertical ScrollBar

vbarValueback to summary
private Var<Double> vbarValue
vbarValueListenerback to summary
private final ChangeListener<Double> vbarValueListener
vPosEstimateback to summary
private Var<Double> vPosEstimate
vPosEstimateListenerback to summary
private final ChangeListener<Double> vPosEstimateListener

Constructor Detail

VirtualizedScrollPaneback to summary
public VirtualizedScrollPane(V content, ScrollPane.ScrollBarPolicy hPolicy, ScrollPane.ScrollBarPolicy vPolicy)

Constructs a VirtualizedScrollPane with the given content and policies

VirtualizedScrollPaneback to summary
public VirtualizedScrollPane(V content)

Constructs a VirtualizedScrollPane that only displays its horizontal and vertical scroll bars as needed

Method Detail

computeMaxHeightback to summary
protected double computeMaxHeight(double width)

Overrides javafx.scene.layout.Region.computeMaxHeight.

Doc from javafx.scene.layout.Region.computeMaxHeight.

Computes the maximum height of this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return a different 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
computeMaxWidthback to summary
protected double computeMaxWidth(double height)

Overrides javafx.scene.layout.Region.computeMaxWidth.

Doc from javafx.scene.layout.Region.computeMaxWidth.

Computes the maximum width for this region. Returns Double.MAX_VALUE by default. Region subclasses may override this method to return an different 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
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
disposeback to summary
private void dispose()
estimatedScrollXPropertyback to summary
public Var<Double> estimatedScrollXProperty()

Implements org.fxmisc.flowless.Virtualized.estimatedScrollXProperty.

Annotations
@Override
estimatedScrollYPropertyback to summary
public Var<Double> estimatedScrollYProperty()

Implements org.fxmisc.flowless.Virtualized.estimatedScrollYProperty.

Annotations
@Override
getContentback to summary
public V getContent()

Does not unbind scrolling from Content before returning Content.

Returns:V

- the content

getHbarPolicyback to summary
public final ScrollPane.ScrollBarPolicy getHbarPolicy()
getVbarPolicyback to summary
public final ScrollPane.ScrollBarPolicy getVbarPolicy()
hbarPolicyPropertyback to summary
public final Var<ScrollPane.ScrollBarPolicy> hbarPolicyProperty()
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
offsetToScrollbarPositionback to summary
private static double offsetToScrollbarPosition(double contentOffset, double viewportSize, double padding, double contentSize)
removeContentback to summary
public V removeContent()

Unbinds scrolling from Content before returning Content.

Returns:V

- the content

scrollbarPositionToOffsetback to summary
private static double scrollbarPositionToOffset(double scrollbarPos, double viewportSize, double padding, double contentSize)
scrollXByback to summary
public void scrollXBy(double deltaX)

Implements org.fxmisc.flowless.Virtualized.scrollXBy.

Doc from org.fxmisc.flowless.Virtualized.scrollXBy.

Scroll the content horizontally by the given amount.

Annotations
@Override
scrollXToPixelback to summary
public void scrollXToPixel(double pixel)

Implements org.fxmisc.flowless.Virtualized.scrollXToPixel.

Doc from org.fxmisc.flowless.Virtualized.scrollXToPixel.

Scroll the content horizontally to the pixel

Annotations
@Override
scrollYByback to summary
public void scrollYBy(double deltaY)

Implements org.fxmisc.flowless.Virtualized.scrollYBy.

Doc from org.fxmisc.flowless.Virtualized.scrollYBy.

Scroll the content vertically by the given amount.

Annotations
@Override
scrollYToPixelback to summary
public void scrollYToPixel(double pixel)

Implements org.fxmisc.flowless.Virtualized.scrollYToPixel.

Doc from org.fxmisc.flowless.Virtualized.scrollYToPixel.

Scroll the content vertically to the pixel

Annotations
@Override
setHbarPolicyback to summary
public final void setHbarPolicy(ScrollPane.ScrollBarPolicy value)
setHPositionback to summary
private void setHPosition(double pos)
setupUnitIncrementback to summary
private static void setupUnitIncrement(ScrollBar bar)
setVbarPolicyback to summary
public final void setVbarPolicy(ScrollPane.ScrollBarPolicy value)
setVPositionback to summary
private void setVPosition(double pos)
totalHeightEstimatePropertyback to summary
public Val<Double> totalHeightEstimateProperty()

Implements org.fxmisc.flowless.Virtualized.totalHeightEstimateProperty.

Annotations
@Override
totalWidthEstimatePropertyback to summary
public Val<Double> totalWidthEstimateProperty()

Implements org.fxmisc.flowless.Virtualized.totalWidthEstimateProperty.

Annotations
@Override
unbindScrollBarback to summary
private void unbindScrollBar(ScrollBar bar)
vbarPolicyPropertyback to summary
public final Var<ScrollPane.ScrollBarPolicy> vbarPolicyProperty()