javafx.scene.control.ListView , javafx.scene.control.TreeView ,
javafx.scene.control.TableView , and javafx.scene.control.TreeTableView .
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static class | VirtualFlow.
A List-like implementation that is exceedingly efficient for the purposes of the VirtualFlow. |
| pack-priv static class | VirtualFlow.
A simple extension to Region that ensures that anything wanting to flow outside of the bounds of the Region is clipped. |
| Modifier and Type | Field and Description |
|---|---|
| pack-priv double | absoluteOffset
The offset in pixels between the top of the virtualFlow and the content it shows. |
| pack-priv T | accumCell
A special cell used to accumulate bounds, such that we reduce object churn. |
| pack-priv Group | accumCellParent
This group is used for holding the 'accumCell'. |
| private IntegerProperty | cellCount
Indicates the number of cells that should be in the flow. |
| private ObjectProperty | |
| pack-priv final VirtualFlow. | cells
The list of cells representing those cells which actually make up the current view. |
| private final Rectangle | |
| pack-priv VirtualFlow. | clipView
Control in which the cell's sheet is placed and forms the viewport. |
| pack-priv StackPane | corner
When both the horizontal and vertical scroll bars are visible, we have to 'fill in' the bottom right corner where the two scroll bars meet. |
| private static final int | DEFAULT_IMPROVEMENT
The default improvement for the estimation of the total size. |
| private final BitSet | |
| pack-priv double | estimatedSize
An estimation of the total size (height for vertical, width for horizontal). |
| private DoubleProperty | fixedCellSize
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. |
| private boolean | |
| private static final double | |
| private VirtualScrollBar | hbar
The scroll bar used for scrolling horizontally. |
| private boolean | |
| private ArrayList | itemSizeCache
A list containing the cached version of the calculated size (height for vertical, width for horizontal) for a (fictive or real) cell for each element of the backing data. |
| pack-priv double | lastCellBreadth
The breadth of the first visible cell last time we laid out. |
| pack-priv int | lastCellCount
The number of "virtual" cells in the flow the last time it was laid out. |
| pack-priv double | lastCellLength
The length of the first visible cell last time we laid out. |
| pack-priv double | lastHeight
The height of the VirtualFlow the last time it was laid out. |
| pack-priv double | lastPosition
The position last time we laid out. |
| pack-priv boolean | lastVertical
We remember the last value for vertical the last time we laid out the flow. |
| pack-priv double | lastWidth
The width of the VirtualFlow the last time it was laid out. |
| private double | |
| private double | |
| private double | maxPrefBreadth
The maximum preferred size in the non-virtual direction. |
| private static final int | MIN_SCROLLING_LINES_PER_PAGE
Scroll events may request to scroll about a number of "lines". |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private static final String | NEW_CELL
Indicates that this is a newly created cell and we need call processCSS for it. |
| private BooleanProperty | pannable
Indicates whether the VirtualFlow viewport is capable of being panned by the user (either via the mouse or touch events). |
| pack-priv final VirtualFlow. | pile
A structure containing cells that can be reused later. |
| private DoubleProperty | position
The position of the VirtualFlow within its list of cells. |
| private final List | |
| private boolean | |
| pack-priv KeyFrame | |
| pack-priv KeyFrame | |
| pack-priv Timeline | |
| pack-priv final Group | sheet
The group which holds the cells. |
| pack-priv final ObservableList | |
| private boolean | |
| private boolean | |
| private boolean | |
| private boolean | |
| private VirtualScrollBar | vbar
The scroll bar used to scrolling vertically. |
| private BooleanProperty | vertical
Indicates the primary direction of virtualization. |
| private double | viewportBreadth
The breadth of the viewport portion of the VirtualFlow as computed during the layout pass. |
| private double | viewportLength
The length of the viewport portion of the VirtualFlow as computed during the layout pass. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| protected 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). |
| pack-priv void | addLeadingCells(int currentIndex, double startOffset)
Adds all the cells prior to and including the given currentIndex, until no more can be added without falling off the flow. |
| private void | |
| pack-priv boolean | addTrailingCells(boolean fillEmptyCells)
Adds all the trailing cells that come after the last index in the cells ObservableList. |
| pack-priv void | adjustAbsoluteOffset()
Keep the position constant and adjust the absoluteOffset to match the (new) position. |
| private double | Returns: the actual number of pixels that have been appliedAdjust the position based on a delta of pixels. |
| pack-priv void | adjustPosition()
Keep the absoluteOffset constant and adjust the position to match the (new) absoluteOffset. |
| private void | |
| public final IntegerProperty | |
| public final ObjectProperty | Returns: the cell factory propertySetting a custom cell factory has the effect of deferring all cell creation, allowing for total customization of the cell. |
| private void | |
| private boolean | |
| private double | |
| pack-priv int | computeCurrentIndex()
Compute the index of the first visible cell This has package access ONLY FOR TESTING. |
| private int | |
| private double | computeOffsetForCell(int itemIndex)
Given an item index, this function will compute and return the viewport offset from the beginning of the specified item. |
| protected double | computePrefHeight(double
the width that should be used if preferred height depends
on it width)Overrides javafx. Computes the preferred height of this region for the given width; Region subclasses should override this method to return an appropriate value based on their content and layout strategy. |
| protected double | computePrefWidth(double
the height that should be used if preferred width depends
on it height)Overrides javafx. Computes the preferred width of this region for the given height. |
| private double | computeViewportOffset(double position)
Given a position value between 0 and 1, compute and return the viewport offset from the "current" cell associated with that position value. |
| private double | |
| private void | |
| private boolean | |
| private void | |
| public final DoubleProperty | |
| protected T | Returns: the available cellthe preferred index prefIndex)Get a cell which can be used in the layout. |
| public T | |
| pack-priv double | |
| pack-priv double | |
| public final int | |
| public final Callback | |
| protected int | |
| pack-priv double | |
| pack-priv double | |
| pack-priv double | |
| protected List | Returns: the cells displayed in the current viewportReturns the list of cells displayed in the current viewport. |
| pack-priv double | |
| pack-priv void | getCellSizesInExpectedViewport(int
the index of the cell that should be positioned at the top of
the viewport in the next layout cycle. index)Make sure the sizes of the cells that are likely to be visible are known. |
| public T | Returns: the first visible cellLocates and returns the first non-empty IndexedCell that is partially or completely visible. |
| protected T | Returns: first visible cell whose bounds are entirely within the viewportReturns the first visible cell whose bounds are entirely within the viewport. |
| public final double | |
| protected final ScrollBar | Returns: the scroll bar used for scrolling horizontallyReturns the scroll bar used for scrolling horizontally. |
| public T | Returns: the last visible cellLocates and returns the last non-empty IndexedCell that is currently partially or completely visible. |
| protected T | Returns: last visible cell whose bounds are entirely within the viewportReturns the last visible cell whose bounds are entirely within the viewport. |
| pack-priv double | |
| pack-priv final double | |
| pack-priv double | Returns: the size of the element; or 1 in case there are no cells yetGet the size of the considered element. |
| private double | |
| public final double | |
| private double | |
| private double | |
| protected T | Returns: a cell for the given index inserted in the VirtualFlow containerthe cell index index)Creates and returns a new cell for the given index. |
| protected final ScrollBar | Returns: the scroll bar used for scrolling verticallyReturns the scroll bar used for scrolling vertically. |
| private final double | |
| public double | Returns: the viewport length in pixelsReturns the length of the viewport portion of the |
| public T | Returns: the visible cellthe index index)Gets a cell for the given index if the cell has been created and laid out. |
| private void | |
| public final boolean | |
| public final boolean | |
| protected void | layoutChildren()
Overrides javafx. Invoked during the layout pass to layout the children in this
|
| public final BooleanProperty | |
| private void | |
| public final DoubleProperty | |
| protected void | rebuildCells()
Informs the |
| private void | |
| private void | recalculateAndImproveEstimatedSize(int improve, int oldIndex, double oldOffset)
Recalculate the estimated size. |
| private void | recalculateEstimatedSize()
Recalculate the estimated size for this list based on what we have in the cache. |
| protected void | reconfigureCells()
Informs the |
| protected void | recreateCells()
Informs the |
| private void | |
| private void | |
| protected void | requestCellLayout()
Informs the |
| public void | requestLayout()
Overrides javafx. Overridden to implement somewhat more efficient support for layout. |
| private void | |
| private void | |
| protected void | |
| private void | |
| public double | Returns: the number of pixels actually movedthe delta value 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. |
| public void | scrollTo(T
the cell cell)Adjusts the cells such that the selected cell will be fully visible in the viewport (but only just). |
| public void | scrollTo(int
the index index)Adjusts the cells such that the cell in the given index will be fully visible in the viewport. |
| public void | scrollToBottom(T
the last cell lastCell)Adjust the position of cells so that the specified cell will be positioned at the end of the viewport. |
| public void | scrollToTop(T
the first cell firstCell)Adjust the position of cells so that the specified cell will be positioned at the start of the viewport. |
| public void | scrollToTop(int
the index 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. |
| public final void | |
| pack-priv void | |
| public final void | setCellFactory(Callback<VirtualFlow<T>, T>
the new cell factory value)Sets a new cell factory to use in the VirtualFlow. |
| protected void | setCellIndex(T
The cell whose index will be updated. cell, int The new index for the cell. index)The VirtualFlow uses this method to set a cells index (rather than calling
|
| private void | |
| private void | |
| public final void | |
| protected void | |
| private final void | |
| public final void | |
| public final void | |
| pack-priv void | |
| public final void | |
| private final void | |
| pack-priv void | |
| protected void | |
| private void | shiftDown()
In case we are not rendering the first cell AND there is empty room after the last cell, the cells need to be shifted down to fill the empty area. |
| private void | |
| private boolean | |
| pack-priv void | |
| pack-priv void | |
| private void | |
| private void | |
| public final BooleanProperty |