Class VirtualContainerBase<C extends Control,I extends IndexedCell>
- All Implemented Interfaces:
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.
Constructors Constructor Description
Modifier and Type Method Description
()Create the virtualized container that handles the layout and scrolling of all the cells.
()Called by a Skinnable when the Skin is replaced on the Skinnable.
protected abstract int
()Returns the total number of items in this container, including those that are currently hidden because they are out of view.
()Get the virtualized container.
()Call this method to indicate that the item count should be updated on the next pulse.
protected abstract void
()This method is called when it is possible that the item count has changed (i.e.
Methods declared in class javafx.scene.control.SkinBase
computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, layoutChildren, layoutInArea, layoutInArea, layoutInArea, positionInArea, positionInArea, pseudoClassStateChanged, queryAccessibleAttribute, registerChangeListener, registerInvalidationListener, registerListChangeListener, snappedBottomInset, snappedLeftInset, snappedRightInset, snappedTopInset, snapPosition, snapPositionX, snapPositionY, snapSize, snapSizeX, snapSizeY, snapSpace, snapSpaceX, snapSpaceY, unregisterChangeListeners, unregisterInvalidationListeners, unregisterListChangeListeners
Methods declared in class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
VirtualContainerBasepublic VirtualContainerBase(C control)
control- the control
getItemCountprotected abstract int getItemCount()Returns the total number of items in this container, including those that are currently hidden because they are out of view.
- the total number of items in this container
updateItemCountprotected 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 the
createVirtualFlowCreate the virtualized container that handles the layout and scrolling of all the cells. This enables skin subclasses to provide a custom
VirtualFlowimplementation. If not overridden, this method intantiates a default VirtualFlow instance.
- newly created VirtualFlow instance
disposepublic void dispose()Called by a Skinnable when the Skin is replaced on the Skinnable. This method allows a Skin to implement any logic necessary to clean up itself after the Skin is no longer needed. It may be used to release native resources. The methods
Skin.getNode()should return null following a call to dispose. Calling dispose twice has no effect.
Overridden to remove EventHandler.
getVirtualFlowGet the virtualized container. Subclasses can invoke this method to get the VirtualFlow instance.
- the virtualized container
markItemCountDirtyprotected final void markItemCountDirty()Call this method to indicate that the item count should be updated on the next pulse.