Class VirtualFlow<T, C extends Cell<T,?>>
- 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
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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDetermines 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 -
Property Summary
PropertiesTypePropertyDescriptionorg.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, widthProperties inherited from class javafx.scene.Parent
needsLayoutProperties 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 -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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 OrientationHelperprivate final SizeTrackerprivate static final List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> Fields inherited from class javafx.scene.layout.Region
USE_COMPUTED_SIZE, USE_PREF_SIZEFields inherited from class javafx.scene.Node
BASELINE_OFFSET_SAME_AS_HEIGHT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateVirtualFlow(javafx.collections.ObservableList<T> items, Function<? super T, ? extends C> cellFactory, OrientationHelper orientation, VirtualFlow.Gravity gravity) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactfx.value.Var<Double> 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 doubleprotected final doublecomputePrefHeight(double width) private doublecomputePrefLength(double breadth) protected final doublecomputePrefWidth(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 rightstatic <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 horizontallystatic <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 bottomstatic <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 bottomvoiddispose()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 callsParent.layout()as a side-effect to insure that the VirtualFlow is up-to-date in light of any changesstatic List<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> final javafx.geometry.OrientationList<javafx.css.CssMetaData<? extends javafx.css.Styleable, ?>> intGet the index of the first visible cell (at the time of the last layout).Gets the value of thegravityproperty.intGet 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 voidjumpToAbsolutePosition(double pixels) protected voidorg.reactfx.value.Var<Double> (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) Sets the value of thegravityproperty.(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<Double> org.reactfx.value.Val<Double> org.reactfx.value.Val<Double> org.reactfx.value.Val<Double> javafx.collections.ObservableList<C> This method callsParent.layout()as a side-effect to insure that the VirtualFlow is up-to-date in light of any changesMethods 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, widthPropertyMethods inherited from class javafx.scene.Parent
getBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestLayout, requestParentLayout, setNeedsLayout, updateBoundsMethods 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, visiblePropertyMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface javafx.css.Styleable
getStyleableNodeMethods inherited from interface Virtualized
getEstimatedScrollX, getEstimatedScrollY, getTotalHeightEstimate, getTotalWidthEstimate, scrollBy, scrollBy, scrollToPixel, scrollToPixel
-
Property Details
-
breadthOffset
- See Also:
-
totalBreadthEstimate
- See Also:
-
lengthOffsetEstimate
- See Also:
-
totalLengthEstimate
- See Also:
-
totalWidthEstimate
- Specified by:
totalWidthEstimatePropertyin interfaceVirtualized- See Also:
-
totalHeightEstimate
- Specified by:
totalHeightEstimatePropertyin interfaceVirtualized- See Also:
-
estimatedScrollX
- Specified by:
estimatedScrollXPropertyin interfaceVirtualized- See Also:
-
estimatedScrollY
- Specified by:
estimatedScrollYPropertyin interfaceVirtualized- See Also:
-
gravity
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; }- See Also:
-
-
Field Details
-
items
-
orientation
-
cellListManager
-
sizeTracker
-
cellPositioner
-
gravity
-
breadthOffset0
-
breadthOffset
-
lengthOffsetEstimate
-
GRAVITY
-
STYLEABLES
-
-
Constructor Details
-
VirtualFlow
private VirtualFlow(javafx.collections.ObservableList<T> items, Function<? super T, ? extends C> cellFactory, OrientationHelper orientation, VirtualFlow.Gravity gravity)
-
-
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
- Returns:
- the
breadthOffsetproperty
-
totalBreadthEstimateProperty
- Returns:
- the
totalBreadthEstimateproperty
-
lengthOffsetEstimateProperty
- Returns:
- the
lengthOffsetEstimateproperty
-
dispose
public void dispose() -
getCell
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
-
visibleCells
This method callsParent.layout()as a side-effect to insure that the VirtualFlow is up-to-date in light of any changes -
totalLengthEstimateProperty
- Returns:
- the
totalLengthEstimateproperty
-
cellToViewport
-
cellToViewport
-
cellToViewport
-
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
- Specified by:
totalWidthEstimatePropertyin interfaceVirtualized- Returns:
- the
totalWidthEstimateproperty
-
totalHeightEstimateProperty
- Specified by:
totalHeightEstimatePropertyin interfaceVirtualized- Returns:
- the
totalHeightEstimateproperty
-
estimatedScrollXProperty
- Specified by:
estimatedScrollXPropertyin interfaceVirtualized- Returns:
- the
estimatedScrollXproperty
-
estimatedScrollYProperty
- Specified by:
estimatedScrollYPropertyin interfaceVirtualized- Returns:
- the
estimatedScrollYproperty
-
hit
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
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
gravityproperty - See Also:
-
getGravity
Gets the value of thegravityproperty.- 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
gravityproperty - See Also:
-
setGravity
Sets the value of thegravityproperty.- 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 thegravityproperty- See Also:
-
getClassCssMetaData
-
getCssMetaData
- Specified by:
getCssMetaDatain interfacejavafx.css.Styleable- Overrides:
getCssMetaDatain classjavafx.scene.layout.Region
-