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 thecell's noderendersC- theCellthat can render the model with aNode.
- 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 itsNavigator. Based on the viewport'sVirtualFlow.Gravity, it sequentially lays out theNodes of theCells 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'sNodes from "top-to-bottom" or from "bottom-to-top" (these terms should be understood in reference to the viewport'sorientationandVirtualFlow.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.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classVirtualFlow.GravityDetermines 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 org.reactfx.value.Var<java.lang.Double>breadthOffsetprivate org.reactfx.value.Var<java.lang.Double>breadthOffset0private CellListManager<T,C>cellListManagerprivate CellPositioner<T,C>cellPositionerprivate javafx.css.StyleableObjectProperty<VirtualFlow.Gravity>gravityprivate static javafx.css.CssMetaData<VirtualFlow,VirtualFlow.Gravity>GRAVITYprivate javafx.collections.ObservableList<T>itemsprivate org.reactfx.value.Var<java.lang.Double>lengthOffsetEstimateprivate Navigator<T,C>navigatorprivate OrientationHelperorientationprivate SizeTrackersizeTrackerprivate static java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>STYLEABLES
-
Constructor Summary
Constructors Modifier Constructor Description privateVirtualFlow(javafx.collections.ObservableList<T> items, java.util.function.Function<? super T,? extends C> cellFactory, OrientationHelper orientation, VirtualFlow.Gravity gravity)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.reactfx.value.Var<java.lang.Double>breadthOffsetProperty()javafx.geometry.Point2DcellToViewport(C cell, double x, double y)javafx.geometry.BoundscellToViewport(C cell, javafx.geometry.Bounds bounds)javafx.geometry.Point2DcellToViewport(C cell, javafx.geometry.Point2D point)private doublecomputePrefBreadth()protected doublecomputePrefHeight(double width)private doublecomputePrefLength(double breadth)protected doublecomputePrefWidth(double height)static <T,C extends Cell<T,?>>
VirtualFlow<T,C>createHorizontal(javafx.collections.ObservableList<T> items, java.util.function.Function<? super T,? extends C> cellFactory)Creates a viewport that lays out content horizontally from left to rightstatic <T,C extends Cell<T,?>>
VirtualFlow<T,C>createHorizontal(javafx.collections.ObservableList<T> items, java.util.function.Function<? super T,? extends C> cellFactory, VirtualFlow.Gravity gravity)Creates a viewport that lays out content horizontallystatic <T,C extends Cell<T,?>>
VirtualFlow<T,C>createVertical(javafx.collections.ObservableList<T> items, java.util.function.Function<? super T,? extends C> cellFactory)Creates a viewport that lays out content vertically from top to bottomstatic <T,C extends Cell<T,?>>
VirtualFlow<T,C>createVertical(javafx.collections.ObservableList<T> items, java.util.function.Function<? super T,? extends C> cellFactory, VirtualFlow.Gravity gravity)Creates a viewport that lays out content vertically from top to bottomvoiddispose()org.reactfx.value.Var<java.lang.Double>estimatedScrollXProperty()org.reactfx.value.Var<java.lang.Double>estimatedScrollYProperty()CgetCell(int itemIndex)If the item is out of view, instantiates a new cell for the item.java.util.Optional<C>getCellIfVisible(int itemIndex)This method callsParent.layout()as a side-effect to insure that the VirtualFlow is up-to-date in light of any changesstatic java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>getClassCssMetaData()javafx.geometry.OrientationgetContentBias()java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>>getCssMetaData()intgetFirstVisibleIndex()Get the index of the first visible cell (at the time of the last layout).VirtualFlow.GravitygetGravity()intgetLastVisibleIndex()Get the index of the last visible cell (at the time of the last layout).javafx.beans.property.ObjectProperty<VirtualFlow.Gravity>gravityProperty()The gravity of the virtual flow.VirtualFlowHit<C>hit(double x, double y)Hits this virtual flow at the given coordinates.private voidjumpToAbsolutePosition(double pixels)protected voidlayoutChildren()org.reactfx.value.Var<java.lang.Double>lengthOffsetEstimateProperty()(package private) voidscrollBreadth(double deltaBreadth)(package private) voidscrollLength(double deltaLength)voidscrollXBy(double deltaX)Scroll the content horizontally by the given amount.voidscrollXToPixel(double pixel)Scroll the content horizontally to the pixelvoidscrollYBy(double deltaY)Scroll the content vertically by the given amount.voidscrollYToPixel(double pixel)Scroll the content vertically to the pixel(package private) voidsetBreadthOffset(double pixels)voidsetGravity(VirtualFlow.Gravity gravity)(package private) voidsetLengthOffset(double pixels)voidshow(double viewportOffset)Forces the viewport to acts as though it scrolled from 0 toviewportOffset).voidshow(int itemIdx)Forces the viewport to show the given item by "scrolling" to itvoidshow(int itemIndex, javafx.geometry.Bounds region)Forces the viewport to show the given item by "scrolling" to it and then further "scrolling," so that theregionis visible, in one layout call (e.g., this method does not "scroll" twice).voidshowAsFirst(int itemIdx)Forces the viewport to show the given item as the first visible item as determined by itsVirtualFlow.Gravity.voidshowAsLast(int itemIdx)Forces the viewport to show the given item as the last visible item as determined by itsVirtualFlow.Gravity.voidshowAtOffset(int itemIdx, double offset)Forces the viewport to show the given item by "scrolling" to it and then further "scrolling" byoffsetin one layout call (e.g., this method does not "scroll" twice)private voidshowBreadthRegion(double fromX, double toX)org.reactfx.value.Val<java.lang.Double>totalBreadthEstimateProperty()org.reactfx.value.Val<java.lang.Double>totalHeightEstimateProperty()org.reactfx.value.Val<java.lang.Double>totalLengthEstimateProperty()org.reactfx.value.Val<java.lang.Double>totalWidthEstimateProperty()javafx.collections.ObservableList<C>visibleCells()This method callsParent.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 org.fxmisc.flowless.Virtualized
getEstimatedScrollX, getEstimatedScrollY, getTotalHeightEstimate, getTotalWidthEstimate, scrollBy, scrollBy, scrollToPixel, scrollToPixel
-
-
-
-
Field Detail
-
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<java.lang.Double> breadthOffset0
-
breadthOffset
private final org.reactfx.value.Var<java.lang.Double> breadthOffset
-
lengthOffsetEstimate
private final org.reactfx.value.Var<java.lang.Double> lengthOffsetEstimate
-
GRAVITY
private static final javafx.css.CssMetaData<VirtualFlow,VirtualFlow.Gravity> GRAVITY
-
STYLEABLES
private static final java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> STYLEABLES
-
-
Constructor Detail
-
VirtualFlow
private VirtualFlow(javafx.collections.ObservableList<T> items, java.util.function.Function<? super T,? extends C> cellFactory, OrientationHelper orientation, VirtualFlow.Gravity gravity)
-
-
Method Detail
-
createHorizontal
public static <T,C extends Cell<T,?>> VirtualFlow<T,C> createHorizontal(javafx.collections.ObservableList<T> items, java.util.function.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, java.util.function.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, java.util.function.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, java.util.function.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<java.lang.Double> breadthOffsetProperty()
-
totalBreadthEstimateProperty
public org.reactfx.value.Val<java.lang.Double> totalBreadthEstimateProperty()
-
lengthOffsetEstimateProperty
public org.reactfx.value.Var<java.lang.Double> lengthOffsetEstimateProperty()
-
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 java.util.Optional<C> getCellIfVisible(int itemIndex)
This method callsParent.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 callsParent.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<java.lang.Double> totalLengthEstimateProperty()
-
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:
layoutChildrenin classjavafx.scene.Parent
-
computePrefWidth
protected final double computePrefWidth(double height)
- Overrides:
computePrefWidthin classjavafx.scene.layout.Region
-
computePrefHeight
protected final double computePrefHeight(double width)
- Overrides:
computePrefHeightin classjavafx.scene.layout.Region
-
computePrefBreadth
private double computePrefBreadth()
-
computePrefLength
private double computePrefLength(double breadth)
-
getContentBias
public final javafx.geometry.Orientation getContentBias()
- Overrides:
getContentBiasin classjavafx.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:
scrollXByin interfaceVirtualized- 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:
scrollYByin interfaceVirtualized- 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:
scrollXToPixelin interfaceVirtualized- Parameters:
pixel- - the pixel position to which to scroll
-
scrollYToPixel
public void scrollYToPixel(double pixel)
Scroll the content vertically to the pixel- Specified by:
scrollYToPixelin interfaceVirtualized- Parameters:
pixel- - the pixel position to which to scroll
-
totalWidthEstimateProperty
public org.reactfx.value.Val<java.lang.Double> totalWidthEstimateProperty()
- Specified by:
totalWidthEstimatePropertyin interfaceVirtualized
-
totalHeightEstimateProperty
public org.reactfx.value.Val<java.lang.Double> totalHeightEstimateProperty()
- Specified by:
totalHeightEstimatePropertyin interfaceVirtualized
-
estimatedScrollXProperty
public org.reactfx.value.Var<java.lang.Double> estimatedScrollXProperty()
- Specified by:
estimatedScrollXPropertyin interfaceVirtualized
-
estimatedScrollYProperty
public org.reactfx.value.Var<java.lang.Double> estimatedScrollYProperty()
- Specified by:
estimatedScrollYPropertyin interfaceVirtualized
-
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 viewporty- 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 toviewportOffset). Note: the viewport makes an educated guess as to which cell is actually atviewportOffsetif the viewport's entire content was completely rendered.- Parameters:
viewportOffset- SeeOrientationHelperand 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 itsVirtualFlow.Gravity.
-
showAsLast
public void showAsLast(int itemIdx)
Forces the viewport to show the given item as the last visible item as determined by itsVirtualFlow.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" byoffsetin one layout call (e.g., this method does not "scroll" twice)- Parameters:
offset- the offset value as determined by the viewport'sOrientationHelper.
-
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 theregionis 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; }
-
getGravity
public VirtualFlow.Gravity getGravity()
-
setGravity
public void setGravity(VirtualFlow.Gravity gravity)
-
getClassCssMetaData
public static java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getClassCssMetaData()
-
getCssMetaData
public java.util.List<javafx.css.CssMetaData<? extends javafx.css.Styleable,?>> getCssMetaData()
- Specified by:
getCssMetaDatain interfacejavafx.css.Styleable- Overrides:
getCssMetaDatain classjavafx.scene.layout.Region
-
-