- java.lang.Object
- 
- javafx.scene.Node
- 
- javafx.scene.Parent
- 
- javafx.scene.layout.Region
- 
- javafx.scene.control.skin.VirtualFlow<T>
 
 
 
 
- 
- All Implemented Interfaces:
- Styleable,- EventTarget
 
 public class VirtualFlow<T extends IndexedCell> extends Region Implementation of a virtualized container using a cell based mechanism. This is used by the skin implementations for UI controls such asListView,TreeView,TableView, andTreeTableView.- Since:
- 9
 
- 
- 
Property SummaryProperties Type Property Description IntegerPropertycellCountIndicates the number of cells that should be in the flow.ObjectProperty<Callback<VirtualFlow<T>,T>>cellFactorySetting a custom cell factory has the effect of deferring all cell creation, allowing for total customization of the cell.DoublePropertyfixedCellSizeFor optimisation purposes, some use cases can trade dynamic cell length for speed - if fixedCellSize is greater than zero we'll use that rather than determine it by querying the cell itself.BooleanPropertypannableIndicates whether the VirtualFlow viewport is capable of being panned by the user (either via the mouse or touch events).DoublePropertypositionThe position of the VirtualFlow within its list of cells.BooleanPropertyverticalIndicates the primary direction of virtualization.- 
Properties inherited from class javafx.scene.layout.Regionbackground, border, cacheShape, centerShape, height, insets, maxHeight, maxWidth, minHeight, minWidth, opaqueInsets, padding, prefHeight, prefWidth, scaleShape, shape, snapToPixel, width
 - 
Properties inherited from class javafx.scene.ParentneedsLayout
 - 
Properties inherited from class javafx.scene.NodeaccessibleHelp, 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- 
Fields inherited from class javafx.scene.layout.RegionUSE_COMPUTED_SIZE, USE_PREF_SIZE
 - 
Fields inherited from class javafx.scene.NodeBASELINE_OFFSET_SAME_AS_HEIGHT
 
- 
 - 
Constructor SummaryConstructors Constructor Description VirtualFlow()Creates a new VirtualFlow instance.
 - 
Method SummaryModifier and Type Method Description protected voidaddAllToPile()This method will remove all cells from the VirtualFlow and remove them, adding them to the 'pile' (that is, a place from where cells can be used at a later date).IntegerPropertycellCountProperty()Indicates the number of cells that should be in the flow.ObjectProperty<Callback<VirtualFlow<T>,T>>cellFactoryProperty()Setting a custom cell factory has the effect of deferring all cell creation, allowing for total customization of the cell.protected doublecomputePrefHeight(double width)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 doublecomputePrefWidth(double height)Computes the preferred width of this region for the given height.DoublePropertyfixedCellSizeProperty()For optimisation purposes, some use cases can trade dynamic cell length for speed - if fixedCellSize is greater than zero we'll use that rather than determine it by querying the cell itself.protected TgetAvailableCell(int prefIndex)Get a cell which can be used in the layout.TgetCell(int index)Return a cell for the given index.intgetCellCount()Gets the value of the property cellCount.Callback<VirtualFlow<T>,T>getCellFactory()Returns the current cell factory.protected intgetCellIndex(T cell)Return the index for a given cell.protected List<T>getCells()Returns the list of cells displayed in the current viewport.TgetFirstVisibleCell()Locates and returns the first non-empty IndexedCell that is partially or completely visible.protected TgetFirstVisibleCellWithinViewport()Returns the first visible cell whose bounds are entirely within the viewport.doublegetFixedCellSize()Gets the value of the property fixedCellSize.protected ScrollBargetHbar()Returns the scroll bar used for scrolling horizontally.TgetLastVisibleCell()Locates and returns the last non-empty IndexedCell that is currently partially or completely visible.protected TgetLastVisibleCellWithinViewport()Returns the last visible cell whose bounds are entirely within the viewport.doublegetPosition()Gets the value of the property position.protected TgetPrivateCell(int index)Creates and returns a new cell for the given index.protected ScrollBargetVbar()Returns the scroll bar used for scrolling vertically.TgetVisibleCell(int index)Gets a cell for the given index if the cell has been created and laid out.booleanisPannable()Gets the value of the property pannable.booleanisVertical()Gets the value of the property vertical.protected voidlayoutChildren()Invoked during the layout pass to layout the children in thisParent.BooleanPropertypannableProperty()Indicates whether the VirtualFlow viewport is capable of being panned by the user (either via the mouse or touch events).DoublePropertypositionProperty()The position of the VirtualFlow within its list of cells.protected voidrebuildCells()Informs theVirtualFlowthat a layout pass should be done, and cell contents have changed.protected voidreconfigureCells()Informs theVirtualFlowthat a layout pass should be done, and the cell contents have not changed.protected voidrecreateCells()Informs theVirtualFlowthat a layout pass should be done, and that the cell factory has changed.protected voidrequestCellLayout()Informs theVirtualFlowthat a layout pass should be done and only the cell layout will be requested.voidrequestLayout()Overridden to implement somewhat more efficient support for layout.protected voidresizeCell(T cell)Resizes the given cell.doublescrollPixels(double delta)Given a delta value representing a number of pixels, this method attempts to move the VirtualFlow in the given direction (positive is down/right, negative is up/left) the given number of pixels.voidscrollTo(int index)Adjusts the cells such that the cell in the given index will be fully visible in the viewport.voidscrollTo(T cell)Adjusts the cells such that the selected cell will be fully visible in the viewport (but only just).voidscrollToBottom(T lastCell)Adjust the position of cells so that the specified cell will be positioned at the end of the viewport.voidscrollToTop(int index)Adjusts the cells such that the cell in the given index will be fully visible in the viewport, and positioned at the very top of the viewport.voidscrollToTop(T firstCell)Adjust the position of cells so that the specified cell will be positioned at the start of the viewport.voidsetCellCount(int value)Sets the value of the property cellCount.voidsetCellFactory(Callback<VirtualFlow<T>,T> value)Sets a new cell factory to use in the VirtualFlow.protected voidsetCellIndex(T cell, int index)The VirtualFlow uses this method to set a cells index (rather than callingIndexedCell.updateIndex(int)directly), so it is a perfect place for subclasses to override if this if of interest.voidsetFixedCellSize(double value)Sets the value of the property fixedCellSize.protected voidsetHeight(double value)Sets the value of the property height.voidsetPannable(boolean value)Sets the value of the property pannable.voidsetPosition(double value)Sets the value of the property position.voidsetVertical(boolean value)Sets the value of the property vertical.protected voidsetWidth(double value)Sets the value of the property width.BooleanPropertyverticalProperty()Indicates the primary direction of virtualization.- 
Methods inherited from class javafx.scene.layout.RegionbackgroundProperty, borderProperty, cacheShapeProperty, centerShapeProperty, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, getBackground, getBorder, getClassCssMetaData, getCssMetaData, 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, setMaxHeight, setMaxSize, setMaxWidth, setMinHeight, setMinSize, setMinWidth, setOpaqueInsets, setPadding, setPrefHeight, setPrefSize, setPrefWidth, setScaleShape, setShape, setSnapToPixel, shapeProperty, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, snapToPixelProperty, widthProperty
 - 
Methods inherited from class javafx.scene.ParentgetBaselineOffset, getChildren, getChildrenUnmodifiable, getManagedChildren, getStylesheets, isNeedsLayout, layout, lookup, needsLayoutProperty, queryAccessibleAttribute, requestParentLayout, setNeedsLayout, updateBounds
 - 
Methods inherited from class javafx.scene.NodeaccessibleHelpProperty, 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, getContentBias, 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.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 - 
Methods inherited from interface javafx.css.StyleablegetStyleableNode
 
- 
 
- 
- 
- 
Property Detail- 
verticalpublic final BooleanProperty verticalProperty Indicates the primary direction of virtualization. If true, then the primary direction of virtualization is vertical, meaning that cells will stack vertically on top of each other. If false, then they will stack horizontally next to each other.- See Also:
- isVertical(),- setVertical(boolean)
 
 - 
pannablepublic final BooleanProperty pannableProperty Indicates whether the VirtualFlow viewport is capable of being panned by the user (either via the mouse or touch events).- See Also:
- isPannable(),- setPannable(boolean)
 
 - 
cellCountpublic final IntegerProperty cellCountProperty Indicates the number of cells that should be in the flow. The user of the VirtualFlow must set this appropriately. When the cell count changes the VirtualFlow responds by updating the visuals. If the items backing the cells change, but the count has not changed, you must call the reconfigureCells() function to update the visuals.- See Also:
- getCellCount(),- setCellCount(int)
 
 - 
positionpublic final DoubleProperty positionProperty The position of the VirtualFlow within its list of cells. This is a value between 0 and 1.- See Also:
- getPosition(),- setPosition(double)
 
 - 
fixedCellSizepublic final DoubleProperty fixedCellSizeProperty For optimisation purposes, some use cases can trade dynamic cell length for speed - if fixedCellSize is greater than zero we'll use that rather than determine it by querying the cell itself.- See Also:
- getFixedCellSize(),- setFixedCellSize(double)
 
 - 
cellFactorypublic final ObjectProperty<Callback<VirtualFlow<T extends IndexedCell>,T extends IndexedCell>> cellFactoryProperty Setting a custom cell factory has the effect of deferring all cell creation, allowing for total customization of the cell. Internally, the VirtualFlow is responsible for reusing cells - all that is necessary is for the custom cell factory to return from this function a cell which might be usable for representing any item in the VirtualFlow. Refer to the Cellclass documentation for more detail.- See Also:
- getCellFactory(),- setCellFactory(Callback)
 
 
- 
 - 
Method Detail- 
setVerticalpublic final void setVertical(boolean value) Sets the value of the property vertical.- Property description:
- Indicates the primary direction of virtualization. If true, then the primary direction of virtualization is vertical, meaning that cells will stack vertically on top of each other. If false, then they will stack horizontally next to each other.
 
 - 
isVerticalpublic final boolean isVertical() Gets the value of the property vertical.- Property description:
- Indicates the primary direction of virtualization. If true, then the primary direction of virtualization is vertical, meaning that cells will stack vertically on top of each other. If false, then they will stack horizontally next to each other.
 
 - 
verticalPropertypublic final BooleanProperty verticalProperty() Indicates the primary direction of virtualization. If true, then the primary direction of virtualization is vertical, meaning that cells will stack vertically on top of each other. If false, then they will stack horizontally next to each other.- See Also:
- isVertical(),- setVertical(boolean)
 
 - 
isPannablepublic final boolean isPannable() Gets the value of the property pannable.- Property description:
- Indicates whether the VirtualFlow viewport is capable of being panned by the user (either via the mouse or touch events).
 
 - 
setPannablepublic final void setPannable(boolean value) Sets the value of the property pannable.- Property description:
- Indicates whether the VirtualFlow viewport is capable of being panned by the user (either via the mouse or touch events).
 
 - 
pannablePropertypublic final BooleanProperty pannableProperty() Indicates whether the VirtualFlow viewport is capable of being panned by the user (either via the mouse or touch events).- See Also:
- isPannable(),- setPannable(boolean)
 
 - 
getCellCountpublic final int getCellCount() Gets the value of the property cellCount.- Property description:
- Indicates the number of cells that should be in the flow. The user of the VirtualFlow must set this appropriately. When the cell count changes the VirtualFlow responds by updating the visuals. If the items backing the cells change, but the count has not changed, you must call the reconfigureCells() function to update the visuals.
 
 - 
setCellCountpublic final void setCellCount(int value) Sets the value of the property cellCount.- Property description:
- Indicates the number of cells that should be in the flow. The user of the VirtualFlow must set this appropriately. When the cell count changes the VirtualFlow responds by updating the visuals. If the items backing the cells change, but the count has not changed, you must call the reconfigureCells() function to update the visuals.
 
 - 
cellCountPropertypublic final IntegerProperty cellCountProperty() Indicates the number of cells that should be in the flow. The user of the VirtualFlow must set this appropriately. When the cell count changes the VirtualFlow responds by updating the visuals. If the items backing the cells change, but the count has not changed, you must call the reconfigureCells() function to update the visuals.- See Also:
- getCellCount(),- setCellCount(int)
 
 - 
getPositionpublic final double getPosition() Gets the value of the property position.- Property description:
- The position of the VirtualFlow within its list of cells. This is a value between 0 and 1.
 
 - 
setPositionpublic final void setPosition(double value) Sets the value of the property position.- Property description:
- The position of the VirtualFlow within its list of cells. This is a value between 0 and 1.
 
 - 
positionPropertypublic final DoubleProperty positionProperty() The position of the VirtualFlow within its list of cells. This is a value between 0 and 1.- See Also:
- getPosition(),- setPosition(double)
 
 - 
setFixedCellSizepublic final void setFixedCellSize(double value) Sets the value of the property fixedCellSize.- Property description:
- For optimisation purposes, some use cases can trade dynamic cell length for speed - if fixedCellSize is greater than zero we'll use that rather than determine it by querying the cell itself.
 
 - 
getFixedCellSizepublic final double getFixedCellSize() Gets the value of the property fixedCellSize.- Property description:
- For optimisation purposes, some use cases can trade dynamic cell length for speed - if fixedCellSize is greater than zero we'll use that rather than determine it by querying the cell itself.
 
 - 
fixedCellSizePropertypublic final DoubleProperty fixedCellSizeProperty() For optimisation purposes, some use cases can trade dynamic cell length for speed - if fixedCellSize is greater than zero we'll use that rather than determine it by querying the cell itself.- See Also:
- getFixedCellSize(),- setFixedCellSize(double)
 
 - 
setCellFactorypublic final void setCellFactory(Callback<VirtualFlow<T>,T> value) Sets a new cell factory to use in the VirtualFlow. This forces all old cells to be thrown away, and new cells to be created with the new cell factory.- Parameters:
- value- the new cell factory
 
 - 
getCellFactorypublic final Callback<VirtualFlow<T>,T> getCellFactory() Returns the current cell factory.- Returns:
- the current cell factory
 
 - 
cellFactoryPropertypublic final ObjectProperty<Callback<VirtualFlow<T>,T>> cellFactoryProperty() Setting a custom cell factory has the effect of deferring all cell creation, allowing for total customization of the cell. Internally, the VirtualFlow is responsible for reusing cells - all that is necessary is for the custom cell factory to return from this function a cell which might be usable for representing any item in the VirtualFlow. Refer to the Cellclass documentation for more detail.- See Also:
- getCellFactory(),- setCellFactory(Callback)
 
 - 
requestLayoutpublic void requestLayout() Overridden to implement somewhat more efficient support for layout. The VirtualFlow can generally be considered as being unmanaged, in that whenever the position changes, or other such things change, we need to perform a layout but there is no reason to notify the parent. However when things change which may impact the preferred size (such as vertical, createCell, and configCell) then we need to notify the parent.- Overrides:
- requestLayoutin class- Parent
 
 - 
layoutChildrenprotected void layoutChildren() Invoked during the layout pass to layout the children in thisParent. 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. - Overrides:
- layoutChildrenin class- Parent
 
 - 
setWidthprotected void setWidth(double value) Sets the value of the property width.
 - 
setHeightprotected void setHeight(double value) Sets the value of the property height.
 - 
getAvailableCellprotected T getAvailableCell(int prefIndex) Get a cell which can be used in the layout. This function will reuse cells from the pile where possible, and will create new cells when necessary.- Parameters:
- prefIndex- the preferred index
- Returns:
- the available cell
 
 - 
addAllToPileprotected void addAllToPile() This method will remove all cells from the VirtualFlow and remove them, adding them to the 'pile' (that is, a place from where cells can be used at a later date). This method is protected to allow subclasses to clean up appropriately.
 - 
getVisibleCellpublic T getVisibleCell(int index) Gets a cell for the given index if the cell has been created and laid out. "Visible" is a bit of a misnomer, the cell might not be visible in the viewport (it may be clipped), but does distinguish between cells that have been created and are in use vs. those that are in the pile or not created.- Parameters:
- index- the index
- Returns:
- the visible cell
 
 - 
getLastVisibleCellpublic T getLastVisibleCell() Locates and returns the last non-empty IndexedCell that is currently partially or completely visible. This function may return null if there are no cells, or if the viewport length is 0.- Returns:
- the last visible cell
 
 - 
getFirstVisibleCellpublic T getFirstVisibleCell() Locates and returns the first non-empty IndexedCell that is partially or completely visible. This really only ever returns null if there are no cells or the viewport length is 0.- Returns:
- the first visible cell
 
 - 
scrollToToppublic void scrollToTop(T firstCell) Adjust the position of cells so that the specified cell will be positioned at the start of the viewport. The given cell must already be "live".- Parameters:
- firstCell- the first cell
 
 - 
scrollToBottompublic void scrollToBottom(T lastCell) Adjust the position of cells so that the specified cell will be positioned at the end of the viewport. The given cell must already be "live".- Parameters:
- lastCell- the last cell
 
 - 
scrollTopublic void scrollTo(T cell) Adjusts the cells such that the selected cell will be fully visible in the viewport (but only just).- Parameters:
- cell- the cell
 
 - 
scrollTopublic void scrollTo(int index) Adjusts the cells such that the cell in the given index will be fully visible in the viewport.- Parameters:
- index- the index
 
 - 
scrollToToppublic void scrollToTop(int index) Adjusts the cells such that the cell in the given index will be fully visible in the viewport, and positioned at the very top of the viewport.- Parameters:
- index- the index
 
 - 
scrollPixelspublic double scrollPixels(double delta) Given a delta value representing a number of pixels, this method attempts to move the VirtualFlow in the given direction (positive is down/right, negative is up/left) the given number of pixels. It returns the number of pixels actually moved.- Parameters:
- delta- the delta value
- Returns:
- the number of pixels actually moved
 
 - 
computePrefWidthprotected double computePrefWidth(double height) 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.- Overrides:
- computePrefWidthin class- Region
- Parameters:
- height- the height that should be used if preferred width depends on it
- Returns:
- the computed preferred width for this region
 
 - 
computePrefHeightprotected double computePrefHeight(double width) 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.- Overrides:
- computePrefHeightin class- Region
- Parameters:
- width- the width that should be used if preferred height depends on it
- Returns:
- the computed preferred height for this region
 
 - 
getCellpublic T getCell(int index) Return a cell for the given index. This may be called for any cell, including beyond the range defined by cellCount, in which case an empty cell will be returned. The returned value should not be stored for any reason.- Parameters:
- index- the index
- Returns:
- the cell
 
 - 
setCellIndexprotected void setCellIndex(T cell, int index) The VirtualFlow uses this method to set a cells index (rather than callingIndexedCell.updateIndex(int)directly), so it is a perfect place for subclasses to override if this if of interest.- Parameters:
- cell- The cell whose index will be updated.
- index- The new index for the cell.
 
 - 
getCellIndexprotected int getCellIndex(T cell) Return the index for a given cell. This allows subclasses to customise how cell indices are retrieved.- Parameters:
- cell- the cell
- Returns:
- the index
 
 - 
getHbarprotected final ScrollBar getHbar() Returns the scroll bar used for scrolling horizontally. A developer who needs to be notified when a scroll is happening could attach a listener to theScrollBar.valueProperty().- Returns:
- the scroll bar used for scrolling horizontally
- Since:
- 12
 
 - 
getVbarprotected final ScrollBar getVbar() Returns the scroll bar used for scrolling vertically. A developer who needs to be notified when a scroll is happening could attach a listener to theScrollBar.valueProperty(). TheRegion.getWidth()is also useful when adding a component over theTableViewin order to clip it so that it doesn't overlap theScrollBar.- Returns:
- the scroll bar used for scrolling vertically
- Since:
- 12
 
 - 
resizeCellprotected void resizeCell(T cell) Resizes the given cell. IfisVertical()is set totrue, the cell width will be the maximum between the viewport width and the sum of all the cells'prefWidth. The cell height will be computed by the cell itself unlessfixedCellSizeEnabledis set totrue, thengetFixedCellSize()is used. IfisVertical()is set tofalse, the width and height calculations are reversed.- Parameters:
- cell- the cell to resize
- Since:
- 12
 
 - 
getCellsprotected List<T> getCells() Returns the list of cells displayed in the current viewport.The cells are ordered such that the first cell in this list is the first in the view, and the last cell is the last in the view. When pixel scrolling, the list is simply shifted and items drop off the beginning or the end, depending on the order of scrolling. - Returns:
- the cells displayed in the current viewport
- Since:
- 12
 
 - 
getLastVisibleCellWithinViewportprotected T getLastVisibleCellWithinViewport() Returns the last visible cell whose bounds are entirely within the viewport. When manually inserting rows, one may need to know which cell indices are visible in the viewport.- Returns:
- last visible cell whose bounds are entirely within the viewport
- Since:
- 12
 
 - 
getFirstVisibleCellWithinViewportprotected T getFirstVisibleCellWithinViewport() Returns the first visible cell whose bounds are entirely within the viewport. When manually inserting rows, one may need to know which cell indices are visible in the viewport.- Returns:
- first visible cell whose bounds are entirely within the viewport
- Since:
- 12
 
 - 
reconfigureCellsprotected void reconfigureCells() Informs theVirtualFlowthat a layout pass should be done, and the cell contents have not changed. For example, this might be called from aTableVieworListViewwhen a layout is needed and no cells have been added or removed.- Since:
- 12
 
 - 
recreateCellsprotected void recreateCells() Informs theVirtualFlowthat a layout pass should be done, and that the cell factory has changed. All cells in the viewport are recreated with the new cell factory.- Since:
- 12
 
 - 
rebuildCellsprotected void rebuildCells() Informs theVirtualFlowthat a layout pass should be done, and cell contents have changed. All cells are removed and then added properly in the viewport.- Since:
- 12
 
 - 
requestCellLayoutprotected void requestCellLayout() Informs theVirtualFlowthat a layout pass should be done and only the cell layout will be requested.- Since:
- 12
 
 - 
getPrivateCellprotected T getPrivateCell(int index) Creates and returns a new cell for the given index.If the requested index is not already an existing visible cell, it will create a cell for the given index and insert it into the VirtualFlowcontainer. If the index exists, simply returns the visible cell. From that point on, it will be unmanaged, and is up to the caller of this method to manage it.This is useful if a row that should not be visible must be accessed (a row that always stick to the top for example). It can then be easily created, correctly initialized and inserted in the VirtualFlowcontainer.- Parameters:
- index- the cell index
- Returns:
- a cell for the given index inserted in the VirtualFlow container
- Since:
- 12
 
 
- 
 
-