Class VirtualFlow<T,C extends Cell<T,?>>

java.lang.Object
javafx.scene.Node
javafx.scene.Parent
javafx.scene.layout.Region
org.fxmisc.flowless.VirtualFlow<T,C>
Type Parameters:
T - the model content that the cell's node renders
C - the Cell that can render the model with a Node.
All Implemented Interfaces:
javafx.css.Styleable, javafx.event.EventTarget, Virtualized

public class VirtualFlow<T,C extends Cell<T,?>> extends javafx.scene.layout.Region implements Virtualized
A VirtualFlow is a memory-efficient viewport that only renders enough of its content to completely fill up the viewport through its Navigator. Based on the viewport's VirtualFlow.Gravity, it sequentially lays out the Nodes of the Cells until the viewport is completely filled up or it has no additional cell's nodes to render.

Since this viewport does not fully render all of its content, the scroll values are estimates based on the nodes that are currently displayed in the viewport. If every node that could be rendered is the same width or same height, then the corresponding scroll values (e.g., scrollX or totalX) are accurate. Note: the VirtualFlow does not have scroll bars by default. These can be added by wrapping this object in a VirtualizedScrollPane.

Since the viewport can be used to lay out its content horizontally or vertically, it uses two orientation-agnostic terms to refer to its width and height: "breadth" and "length," respectively. The viewport always lays out its cell's Nodes from "top-to-bottom" or from "bottom-to-top" (these terms should be understood in reference to the viewport's orientation and VirtualFlow.Gravity). Thus, its length ("height") is independent as the viewport's bounds are dependent upon its parent's bounds whereas its breadth ("width") is dependent upon its length.

  • Property Summary

    Properties
    Type
    Property
    Description
    org.reactfx.value.Var<Double>
     
    org.reactfx.value.Var<Double>
     
    org.reactfx.value.Var<Double>
     
    javafx.beans.property.ObjectProperty<VirtualFlow.Gravity>
    The gravity of the virtual flow.
    org.reactfx.value.Var<Double>
     
    org.reactfx.value.Val<Double>
     
    org.reactfx.value.Val<Double>
     
    org.reactfx.value.Val<Double>
     
    org.reactfx.value.Val<Double>
     

    Properties inherited from class javafx.scene.layout.Region

    background, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width

    Properties inherited from class javafx.scene.Parent

    needsLayout

    Properties inherited from class javafx.scene.Node

    accessibleHelp, accessibleRoleDescription, accessibleRole, accessibleText, blendMode, boundsInLocal, boundsInParent, cacheHint, cache, clip, cursor, depthTest, disabled, disable, effectiveNodeOrientation, effect, eventDispatcher, focused, focusTraversable, hover, id, inputMethodRequests, layoutBounds, layoutX, layoutY, localToParentTransform, localToSceneTransform, managed, mouseTransparent, nodeOrientation, onContextMenuRequested, onDragDetected, onDragDone, onDragDropped, onDragEntered, onDragExited, onDragOver, onInputMethodTextChanged, onKeyPressed, onKeyReleased, onKeyTyped, onMouseClicked, onMouseDragEntered, onMouseDragExited, onMouseDragged, onMouseDragOver, onMouseDragReleased, onMouseEntered, onMouseExited, onMouseMoved, onMousePressed, onMouseReleased, onRotate, onRotationFinished, onRotationStarted, onScrollFinished, onScroll, onScrollStarted, onSwipeDown, onSwipeLeft, onSwipeRight, onSwipeUp, onTouchMoved, onTouchPressed, onTouchReleased, onTouchStationary, onZoomFinished, onZoom, onZoomStarted, opacity, parent, pickOnBounds, pressed, rotate, rotationAxis, scaleX, scaleY, scaleZ, scene, style, translateX, translateY, translateZ, viewOrder, visible
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Determines how the cells in the viewport should be laid out and where any extra unused space should exist if there are not enough cells to completely fill up the viewport
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.reactfx.value.Var<Double>
     
    private final org.reactfx.value.Var<Double>
     
    private final CellListManager<T,C>
     
    private final CellPositioner<T,C>
     
    private final javafx.css.StyleableObjectProperty<VirtualFlow.Gravity>
     
    private static final javafx.css.CssMetaData<VirtualFlow,VirtualFlow.Gravity>
     
    private final javafx.collections.ObservableList<T>
     
    private final org.reactfx.value.Var<Double>
     
    private final Navigator<T,C>
     
    private final OrientationHelper
     
    private final SizeTracker
     
    private static final List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>
     

    Fields inherited from class javafx.scene.layout.Region

    USE_COMPUTED_SIZE, USE_PREF_SIZE

    Fields inherited from class javafx.scene.Node

    BASELINE_OFFSET_SAME_AS_HEIGHT
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
    VirtualFlow(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory, OrientationHelper orientation, VirtualFlow.Gravity gravity)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.reactfx.value.Var<Double>
     
    javafx.geometry.Point2D
    cellToViewport(C cell, double x, double y)
     
    javafx.geometry.Bounds
    cellToViewport(C cell, javafx.geometry.Bounds bounds)
     
    javafx.geometry.Point2D
    cellToViewport(C cell, javafx.geometry.Point2D point)
     
    private double
     
    protected final double
    computePrefHeight(double width)
     
    private double
    computePrefLength(double breadth)
     
    protected final double
    computePrefWidth(double height)
     
    static <T, C extends Cell<T, ?>>
    VirtualFlow<T,C>
    createHorizontal(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory)
    Creates a viewport that lays out content horizontally from left to right
    static <T, C extends Cell<T, ?>>
    VirtualFlow<T,C>
    createHorizontal(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory, VirtualFlow.Gravity gravity)
    Creates a viewport that lays out content horizontally
    static <T, C extends Cell<T, ?>>
    VirtualFlow<T,C>
    createVertical(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory)
    Creates a viewport that lays out content vertically from top to bottom
    static <T, C extends Cell<T, ?>>
    VirtualFlow<T,C>
    createVertical(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory, VirtualFlow.Gravity gravity)
    Creates a viewport that lays out content vertically from top to bottom
    void
     
    org.reactfx.value.Var<Double>
     
    org.reactfx.value.Var<Double>
     
    getCell(int itemIndex)
    If the item is out of view, instantiates a new cell for the item.
    getCellIfVisible(int itemIndex)
    This method calls Parent.layout() as a side-effect to insure that the VirtualFlow is up-to-date in light of any changes
    static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>
     
    final javafx.geometry.Orientation
     
    List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>
     
    int
    Get the index of the first visible cell (at the time of the last layout).
    Gets the value of the gravity property.
    int
    Get the index of the last visible cell (at the time of the last layout).
    javafx.beans.property.ObjectProperty<VirtualFlow.Gravity>
    The gravity of the virtual flow.
    hit(double x, double y)
    Hits this virtual flow at the given coordinates.
    private void
    jumpToAbsolutePosition(double pixels)
     
    protected void
     
    org.reactfx.value.Var<Double>
     
    (package private) void
    scrollBreadth(double deltaBreadth)
     
    (package private) void
    scrollLength(double deltaLength)
     
    void
    scrollXBy(double deltaX)
    Scroll the content horizontally by the given amount.
    void
    scrollXToPixel(double pixel)
    Scroll the content horizontally to the pixel
    void
    scrollYBy(double deltaY)
    Scroll the content vertically by the given amount.
    void
    scrollYToPixel(double pixel)
    Scroll the content vertically to the pixel
    (package private) void
    setBreadthOffset(double pixels)
     
    void
    Sets the value of the gravity property.
    (package private) void
    setLengthOffset(double pixels)
     
    void
    show(double viewportOffset)
    Forces the viewport to acts as though it scrolled from 0 to viewportOffset).
    void
    show(int itemIdx)
    Forces the viewport to show the given item by "scrolling" to it
    void
    show(int itemIndex, javafx.geometry.Bounds region)
    Forces the viewport to show the given item by "scrolling" to it and then further "scrolling," so that the region is visible, in one layout call (e.g., this method does not "scroll" twice).
    void
    showAsFirst(int itemIdx)
    Forces the viewport to show the given item as the first visible item as determined by its VirtualFlow.Gravity.
    void
    showAsLast(int itemIdx)
    Forces the viewport to show the given item as the last visible item as determined by its VirtualFlow.Gravity.
    void
    showAtOffset(int itemIdx, double offset)
    Forces the viewport to show the given item by "scrolling" to it and then further "scrolling" by offset in one layout call (e.g., this method does not "scroll" twice)
    private void
    showBreadthRegion(double fromX, double toX)
     
    org.reactfx.value.Val<Double>
     
    org.reactfx.value.Val<Double>
     
    org.reactfx.value.Val<Double>
     
    org.reactfx.value.Val<Double>
     
    javafx.collections.ObservableList<C>
    This method calls Parent.layout() as a side-effect to insure that the VirtualFlow is up-to-date in light of any changes

    Methods inherited from class javafx.scene.layout.Region

    backgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, getBackground, getBorder, getHeight, getInsets, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getOpaqueInsets, getPadding, getPrefHeight, getPrefWidth, getShape, getUserAgentStylesheet, getWidth, heightProperty, insetsProperty, isCacheShape, isCenterShape, isResizable, isScaleShape, isSnapToPixel, layoutInArea, layoutInArea, layoutInArea, layoutInArea, maxHeight, maxHeightProperty, maxWidth, maxWidthProperty, minHeight, minHeightProperty, minWidth, minWidthProperty, opaqueInsetsProperty, paddingProperty, positionInArea, positionInArea, prefHeight, prefHeightProperty, prefWidth, prefWidthProperty, resize, scaleShapeProperty, setBackground, setBorder, setCacheShape, setCenterShape, setHeight, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, setWidth, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty

    Methods inherited from class javafx.scene.Parent

    getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBounds

    Methods inherited from class javafx.scene.Node

    accessibleHelpProperty, accessibleRoleDescriptionProperty, accessibleRoleProperty, accessibleTextProperty, addEventFilter, addEventHandler, applyCss, autosize, blendModeProperty, boundsInLocalProperty, boundsInParentProperty, buildEventDispatchChain, cacheHintProperty, cacheProperty, clipProperty, computeAreaInScreen, contains, contains, cursorProperty, depthTestProperty, disabledProperty, disableProperty, effectiveNodeOrientationProperty, effectProperty, eventDispatcherProperty, executeAccessibleAction, fireEvent, focusedProperty, focusTraversableProperty, getAccessibleHelp, getAccessibleRole, getAccessibleRoleDescription, getAccessibleText, getBlendMode, getBoundsInLocal, getBoundsInParent, getCacheHint, getClip, getCursor, getDepthTest, getEffect, getEffectiveNodeOrientation, getEventDispatcher, getId, getInitialCursor, getInitialFocusTraversable, getInputMethodRequests, getLayoutBounds, getLayoutX, getLayoutY, getLocalToParentTransform, getLocalToSceneTransform, getNodeOrientation, getOnContextMenuRequested, getOnDragDetected, getOnDragDone, getOnDragDropped, getOnDragEntered, getOnDragExited, getOnDragOver, getOnInputMethodTextChanged, getOnKeyPressed, getOnKeyReleased, getOnKeyTyped, getOnMouseClicked, getOnMouseDragEntered, getOnMouseDragExited, getOnMouseDragged, getOnMouseDragOver, getOnMouseDragReleased, getOnMouseEntered, getOnMouseExited, getOnMouseMoved, getOnMousePressed, getOnMouseReleased, getOnRotate, getOnRotationFinished, getOnRotationStarted, getOnScroll, getOnScrollFinished, getOnScrollStarted, getOnSwipeDown, getOnSwipeLeft, getOnSwipeRight, getOnSwipeUp, getOnTouchMoved, getOnTouchPressed, getOnTouchReleased, getOnTouchStationary, getOnZoom, getOnZoomFinished, getOnZoomStarted, getOpacity, getParent, getProperties, getPseudoClassStates, getRotate, getRotationAxis, getScaleX, getScaleY, getScaleZ, getScene, getStyle, getStyleableParent, getStyleClass, getTransforms, getTranslateX, getTranslateY, getTranslateZ, getTypeSelector, getUserData, getViewOrder, hasProperties, hoverProperty, idProperty, inputMethodRequestsProperty, intersects, intersects, isCache, isDisable, isDisabled, isFocused, isFocusTraversable, isHover, isManaged, isMouseTransparent, isPickOnBounds, isPressed, isVisible, layoutBoundsProperty, layoutXProperty, layoutYProperty, localToParent, localToParent, localToParent, localToParent, localToParent, localToParentTransformProperty, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToScene, localToSceneTransformProperty, localToScreen, localToScreen, localToScreen, localToScreen, localToScreen, lookupAll, managedProperty, mouseTransparentProperty, nodeOrientationProperty, notifyAccessibleAttributeChanged, onContextMenuRequestedProperty, onDragDetectedProperty, onDragDoneProperty, onDragDroppedProperty, onDragEnteredProperty, onDragExitedProperty, onDragOverProperty, onInputMethodTextChangedProperty, onKeyPressedProperty, onKeyReleasedProperty, onKeyTypedProperty, onMouseClickedProperty, onMouseDragEnteredProperty, onMouseDragExitedProperty, onMouseDraggedProperty, onMouseDragOverProperty, onMouseDragReleasedProperty, onMouseEnteredProperty, onMouseExitedProperty, onMouseMovedProperty, onMousePressedProperty, onMouseReleasedProperty, onRotateProperty, onRotationFinishedProperty, onRotationStartedProperty, onScrollFinishedProperty, onScrollProperty, onScrollStartedProperty, onSwipeDownProperty, onSwipeLeftProperty, onSwipeRightProperty, onSwipeUpProperty, onTouchMovedProperty, onTouchPressedProperty, onTouchReleasedProperty, onTouchStationaryProperty, onZoomFinishedProperty, onZoomProperty, onZoomStartedProperty, opacityProperty, parentProperty, parentToLocal, parentToLocal, parentToLocal, parentToLocal, parentToLocal, pickOnBoundsProperty, pressedProperty, pseudoClassStateChanged, relocate, removeEventFilter, removeEventHandler, requestFocus, resizeRelocate, rotateProperty, rotationAxisProperty, scaleXProperty, scaleYProperty, scaleZProperty, sceneProperty, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, sceneToLocal, screenToLocal, screenToLocal, screenToLocal, setAccessibleHelp, setAccessibleRole, setAccessibleRoleDescription, setAccessibleText, setBlendMode, setCache, setCacheHint, setClip, setCursor, setDepthTest, setDisable, setDisabled, setEffect, setEventDispatcher, setEventHandler, setFocused, setFocusTraversable, setHover, setId, setInputMethodRequests, setLayoutX, setLayoutY, setManaged, setMouseTransparent, setNodeOrientation, setOnContextMenuRequested, setOnDragDetected, setOnDragDone, setOnDragDropped, setOnDragEntered, setOnDragExited, setOnDragOver, setOnInputMethodTextChanged, setOnKeyPressed, setOnKeyReleased, setOnKeyTyped, setOnMouseClicked, setOnMouseDragEntered, setOnMouseDragExited, setOnMouseDragged, setOnMouseDragOver, setOnMouseDragReleased, setOnMouseEntered, setOnMouseExited, setOnMouseMoved, setOnMousePressed, setOnMouseReleased, setOnRotate, setOnRotationFinished, setOnRotationStarted, setOnScroll, setOnScrollFinished, setOnScrollStarted, setOnSwipeDown, setOnSwipeLeft, setOnSwipeRight, setOnSwipeUp, setOnTouchMoved, setOnTouchPressed, setOnTouchReleased, setOnTouchStationary, setOnZoom, setOnZoomFinished, setOnZoomStarted, setOpacity, setPickOnBounds, setPressed, setRotate, setRotationAxis, setScaleX, setScaleY, setScaleZ, setStyle, setTranslateX, setTranslateY, setTranslateZ, setUserData, setViewOrder, setVisible, snapshot, snapshot, startDragAndDrop, startFullDrag, styleProperty, toBack, toFront, toString, translateXProperty, translateYProperty, translateZProperty, usesMirroring, viewOrderProperty, visibleProperty

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface javafx.css.Styleable

    getStyleableNode
  • Property Details

  • Field Details

    • items

      private final javafx.collections.ObservableList<T> items
    • orientation

      private final OrientationHelper orientation
    • cellListManager

      private final CellListManager<T,C extends Cell<T,?>> cellListManager
    • sizeTracker

      private final SizeTracker sizeTracker
    • cellPositioner

      private final CellPositioner<T,C extends Cell<T,?>> cellPositioner
    • gravity

      private final javafx.css.StyleableObjectProperty<VirtualFlow.Gravity> gravity
    • breadthOffset0

      private final org.reactfx.value.Var<Double> breadthOffset0
    • breadthOffset

      private final org.reactfx.value.Var<Double> breadthOffset
    • lengthOffsetEstimate

      private final org.reactfx.value.Var<Double> lengthOffsetEstimate
    • GRAVITY

      private static final javafx.css.CssMetaData<VirtualFlow,VirtualFlow.Gravity> GRAVITY
    • STYLEABLES

      private static final List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> STYLEABLES
  • Constructor Details

  • Method Details

    • createHorizontal

      public static <T, C extends Cell<T, ?>> VirtualFlow<T,C> createHorizontal(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory)
      Creates a viewport that lays out content horizontally from left to right
    • createHorizontal

      public static <T, C extends Cell<T, ?>> VirtualFlow<T,C> createHorizontal(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory, VirtualFlow.Gravity gravity)
      Creates a viewport that lays out content horizontally
    • createVertical

      public static <T, C extends Cell<T, ?>> VirtualFlow<T,C> createVertical(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory)
      Creates a viewport that lays out content vertically from top to bottom
    • createVertical

      public static <T, C extends Cell<T, ?>> VirtualFlow<T,C> createVertical(javafx.collections.ObservableList<T> items, Function<? super T,? extends C> cellFactory, VirtualFlow.Gravity gravity)
      Creates a viewport that lays out content vertically from top to bottom
    • breadthOffsetProperty

      public org.reactfx.value.Var<Double> breadthOffsetProperty()
      Returns:
      the breadthOffset property
    • totalBreadthEstimateProperty

      public org.reactfx.value.Val<Double> totalBreadthEstimateProperty()
      Returns:
      the totalBreadthEstimate property
    • lengthOffsetEstimateProperty

      public org.reactfx.value.Var<Double> lengthOffsetEstimateProperty()
      Returns:
      the lengthOffsetEstimate property
    • dispose

      public void dispose()
    • getCell

      public C getCell(int itemIndex)
      If the item is out of view, instantiates a new cell for the item. The returned cell will be properly sized, but not properly positioned relative to the cells in the viewport, unless it is itself in the viewport.
      Returns:
      Cell for the given item. The cell will be valid only until the next layout pass. It should therefore not be stored. It is intended to be used for measurement purposes only.
    • getCellIfVisible

      public Optional<C> getCellIfVisible(int itemIndex)
      This method calls Parent.layout() as a side-effect to insure that the VirtualFlow is up-to-date in light of any changes
    • visibleCells

      public javafx.collections.ObservableList<C> visibleCells()
      This method calls Parent.layout() as a side-effect to insure that the VirtualFlow is up-to-date in light of any changes
    • totalLengthEstimateProperty

      public org.reactfx.value.Val<Double> totalLengthEstimateProperty()
      Returns:
      the totalLengthEstimate property
    • cellToViewport

      public javafx.geometry.Bounds cellToViewport(C cell, javafx.geometry.Bounds bounds)
    • cellToViewport

      public javafx.geometry.Point2D cellToViewport(C cell, javafx.geometry.Point2D point)
    • cellToViewport

      public javafx.geometry.Point2D cellToViewport(C cell, double x, double y)
    • layoutChildren

      protected void layoutChildren()
      Overrides:
      layoutChildren in class javafx.scene.Parent
    • computePrefWidth

      protected final double computePrefWidth(double height)
      Overrides:
      computePrefWidth in class javafx.scene.layout.Region
    • computePrefHeight

      protected final double computePrefHeight(double width)
      Overrides:
      computePrefHeight in class javafx.scene.layout.Region
    • computePrefBreadth

      private double computePrefBreadth()
    • computePrefLength

      private double computePrefLength(double breadth)
    • getContentBias

      public final javafx.geometry.Orientation getContentBias()
      Overrides:
      getContentBias in class javafx.scene.Node
    • scrollLength

      void scrollLength(double deltaLength)
    • scrollBreadth

      void scrollBreadth(double deltaBreadth)
    • scrollXBy

      public void scrollXBy(double deltaX)
      Scroll the content horizontally by the given amount.
      Specified by:
      scrollXBy in interface Virtualized
      Parameters:
      deltaX - positive value scrolls right, negative value scrolls left
    • scrollYBy

      public void scrollYBy(double deltaY)
      Scroll the content vertically by the given amount.
      Specified by:
      scrollYBy in interface Virtualized
      Parameters:
      deltaY - positive value scrolls down, negative value scrolls up
    • scrollXToPixel

      public void scrollXToPixel(double pixel)
      Scroll the content horizontally to the pixel
      Specified by:
      scrollXToPixel in interface Virtualized
      Parameters:
      pixel - - the pixel position to which to scroll
    • scrollYToPixel

      public void scrollYToPixel(double pixel)
      Scroll the content vertically to the pixel
      Specified by:
      scrollYToPixel in interface Virtualized
      Parameters:
      pixel - - the pixel position to which to scroll
    • totalWidthEstimateProperty

      public org.reactfx.value.Val<Double> totalWidthEstimateProperty()
      Specified by:
      totalWidthEstimateProperty in interface Virtualized
      Returns:
      the totalWidthEstimate property
    • totalHeightEstimateProperty

      public org.reactfx.value.Val<Double> totalHeightEstimateProperty()
      Specified by:
      totalHeightEstimateProperty in interface Virtualized
      Returns:
      the totalHeightEstimate property
    • estimatedScrollXProperty

      public org.reactfx.value.Var<Double> estimatedScrollXProperty()
      Specified by:
      estimatedScrollXProperty in interface Virtualized
      Returns:
      the estimatedScrollX property
    • estimatedScrollYProperty

      public org.reactfx.value.Var<Double> estimatedScrollYProperty()
      Specified by:
      estimatedScrollYProperty in interface Virtualized
      Returns:
      the estimatedScrollY property
    • hit

      public VirtualFlowHit<C> hit(double x, double y)
      Hits this virtual flow at the given coordinates.
      Parameters:
      x - x offset from the left edge of the viewport
      y - y offset from the top edge of the viewport
      Returns:
      hit info containing the cell that was hit and coordinates relative to the cell. If the hit was before the cells (i.e. above a vertical flow content or left of a horizontal flow content), returns a hit before cells containing offset from the top left corner of the content. If the hit was after the cells (i.e. below a vertical flow content or right of a horizontal flow content), returns a hit after cells containing offset from the top right corner of the content of a horizontal flow or bottom left corner of the content of a vertical flow.
    • show

      public void show(double viewportOffset)
      Forces the viewport to acts as though it scrolled from 0 to viewportOffset). Note: the viewport makes an educated guess as to which cell is actually at viewportOffset if the viewport's entire content was completely rendered.
      Parameters:
      viewportOffset - See OrientationHelper and its implementations for explanation on what the offset means based on which implementation is used.
    • show

      public void show(int itemIdx)
      Forces the viewport to show the given item by "scrolling" to it
    • showAsFirst

      public void showAsFirst(int itemIdx)
      Forces the viewport to show the given item as the first visible item as determined by its VirtualFlow.Gravity.
    • showAsLast

      public void showAsLast(int itemIdx)
      Forces the viewport to show the given item as the last visible item as determined by its VirtualFlow.Gravity.
    • showAtOffset

      public void showAtOffset(int itemIdx, double offset)
      Forces the viewport to show the given item by "scrolling" to it and then further "scrolling" by offset in one layout call (e.g., this method does not "scroll" twice)
      Parameters:
      offset - the offset value as determined by the viewport's OrientationHelper.
    • show

      public void show(int itemIndex, javafx.geometry.Bounds region)
      Forces the viewport to show the given item by "scrolling" to it and then further "scrolling," so that the region is visible, in one layout call (e.g., this method does not "scroll" twice).
    • getFirstVisibleIndex

      public int getFirstVisibleIndex()
      Get the index of the first visible cell (at the time of the last layout).
      Returns:
      The index of the first visible cell
    • getLastVisibleIndex

      public int getLastVisibleIndex()
      Get the index of the last visible cell (at the time of the last layout).
      Returns:
      The index of the last visible cell
    • showBreadthRegion

      private void showBreadthRegion(double fromX, double toX)
    • setLengthOffset

      void setLengthOffset(double pixels)
    • setBreadthOffset

      void setBreadthOffset(double pixels)
    • jumpToAbsolutePosition

      private void jumpToAbsolutePosition(double pixels)
    • gravityProperty

      public javafx.beans.property.ObjectProperty<VirtualFlow.Gravity> gravityProperty()
      The gravity of the virtual flow. When there are not enough cells to fill the full height (vertical virtual flow) or width (horizontal virtual flow), the cells are placed either at the front (vertical: top, horizontal: left), or rear (vertical: bottom, horizontal: right) of the virtual flow, depending on the value of the gravity property. The gravity can also be styled in CSS, using the "-flowless-gravity" property, for example:
      .virtual-flow { -flowless-gravity: rear; }
      Returns:
      the gravity property
      See Also:
    • getGravity

      public VirtualFlow.Gravity getGravity()
      Gets the value of the gravity property.
      Property description:
      The gravity of the virtual flow. When there are not enough cells to fill the full height (vertical virtual flow) or width (horizontal virtual flow), the cells are placed either at the front (vertical: top, horizontal: left), or rear (vertical: bottom, horizontal: right) of the virtual flow, depending on the value of the gravity property. The gravity can also be styled in CSS, using the "-flowless-gravity" property, for example:
      .virtual-flow { -flowless-gravity: rear; }
      Returns:
      the value of the gravity property
      See Also:
    • setGravity

      public void setGravity(VirtualFlow.Gravity gravity)
      Sets the value of the gravity property.
      Property description:
      The gravity of the virtual flow. When there are not enough cells to fill the full height (vertical virtual flow) or width (horizontal virtual flow), the cells are placed either at the front (vertical: top, horizontal: left), or rear (vertical: bottom, horizontal: right) of the virtual flow, depending on the value of the gravity property. The gravity can also be styled in CSS, using the "-flowless-gravity" property, for example:
      .virtual-flow { -flowless-gravity: rear; }
      Parameters:
      gravity - the value for the gravity property
      See Also:
    • getClassCssMetaData

      public static List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getClassCssMetaData()
    • getCssMetaData

      public List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getCssMetaData()
      Specified by:
      getCssMetaData in interface javafx.css.Styleable
      Overrides:
      getCssMetaData in class javafx.scene.layout.Region