Module javafx.controls
Package javafx.scene.control.skin
Class VirtualContainerBase<C extends Control,I extends IndexedCell>
- java.lang.Object
-
- javafx.scene.control.SkinBase<C>
-
- javafx.scene.control.skin.VirtualContainerBase<C,I>
-
- All Implemented Interfaces:
Skin<C>
- Direct Known Subclasses:
ListViewSkin
,TableViewSkinBase
,TreeViewSkin
public abstract class VirtualContainerBase<C extends Control,I extends IndexedCell> extends SkinBase<C>
Parent class to control skins whose contents are virtualized and scrollable. This class handles the interaction with the VirtualFlow class, which is the main class handling the virtualization of the contents of this container.- Since:
- 9
-
-
Constructor Summary
Constructors Constructor Description VirtualContainerBase(C control)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract int
getItemCount()
Returns the total number of items in this container, including those that are currently hidden because they are out of view.protected void
layoutChildren(double x, double y, double w, double h)
Called during the layout pass of the scenegraph.protected void
markItemCountDirty()
Call this method to indicate that the item count should be updated on the next pulse.protected abstract void
updateItemCount()
This method is called when it is possible that the item count has changed (i.e. scrolling has occurred, the control has resized, etc).-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from class javafx.scene.control.SkinBase
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, dispose, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners
-
-
-
-
Constructor Detail
-
VirtualContainerBase
public VirtualContainerBase(C control)
- Parameters:
control
- the control
-
-
Method Detail
-
getItemCount
protected abstract int getItemCount()
Returns the total number of items in this container, including those that are currently hidden because they are out of view.- Returns:
- the total number of items in this container
-
updateItemCount
protected abstract void updateItemCount()
This method is called when it is possible that the item count has changed (i.e. scrolling has occurred, the control has resized, etc). This method should recalculate the item count and store that for future use by thegetItemCount()
method.
-
markItemCountDirty
protected final void markItemCountDirty()
Call this method to indicate that the item count should be updated on the next pulse.
-
layoutChildren
protected void layoutChildren(double x, double y, double w, double h)
Called during the layout pass of the scenegraph.- Overrides:
layoutChildren
in classSkinBase<C extends Control>
- Parameters:
x
- the x positiony
- the y positionw
- the widthh
- the height
-
-