Top Description Fields Constructors Methods
javafx.scene.control.skin

public abstract Class VirtualContainerBase<C extends Control, I extends IndexedCell<T>>

extends SkinBase<C extends Control>
Class Inheritance
Known Direct Subclasses
javafx.scene.control.skin.ListViewSkin, javafx.scene.control.skin.TableViewSkinBase, javafx.scene.control.skin.TreeViewSkin
Type Parameters
<C>
the type of the control
<I>
the type of the index cell
Imports
javafx.scene.control.Control, .IndexedCell, .ScrollToEvent, .SkinBase, com.sun.javafx.scene.control.ListenerHelper

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

Field Summary

Modifier and TypeField and Description
private final VirtualFlow<I>
flow

The virtualized container which handles the layout and scrolling of all the cells.

private boolean

Constructor Summary

AccessConstructor and Description
public
VirtualContainerBase(final C
the control
control
)

Constructor for subclasses to call.

Method Summary

Modifier and TypeMethod and Description
pack-priv void
protected VirtualFlow<I>

Returns:

newly created VirtualFlow instance
createVirtualFlow
()

Create the virtualized container that handles the layout and scrolling of all the cells.

public void
dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Called when a previously installed skin is about to be removed from its associated control.

protected abstract int

Returns:

the total number of items in this container
getItemCount
()

Returns the total number of items in this container, including those that are currently hidden because they are out of view.

pack-priv double
getMaxCellWidth(int rowsToCount)

protected final VirtualFlow<I>

Returns:

the virtualized container
getVirtualFlow
()

Get the virtualized container.

pack-priv double
protected void
layoutChildren(double
the x position
x
,
double
the y position
y
,
double
the width
w
,
double
the height
h
)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

protected final void
markItemCountDirty()

Call this method to indicate that the item count should be updated on the next pulse.

pack-priv void
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).

Inherited from javafx.scene.control.SkinBase:
computeBaselineOffsetcomputeMaxHeightcomputeMaxWidthcomputeMinHeightcomputeMinWidthcomputePrefHeightcomputePrefWidthconsumeMouseEventsexecuteAccessibleActiongetChildrengetClassCssMetaDatagetCssMetaDatagetNodegetSkinnablelayoutInArealayoutInArealayoutInAreapositionInAreapositionInAreapseudoClassStateChangedqueryAccessibleAttributeregisterChangeListenerregisterInvalidationListenerregisterListChangeListenersnappedBottomInsetsnappedLeftInsetsnappedRightInsetsnappedTopInsetsnapPositionsnapPositionXsnapPositionYsnapSizesnapSizeXsnapSizeYsnapSpacesnapSpaceXsnapSpaceYunregisterChangeListenersunregisterInvalidationListenersunregisterListChangeListeners

Field Detail

flowback to summary
private final VirtualFlow<I> flow

The virtualized container which handles the layout and scrolling of all the cells.

itemCountDirtyback to summary
private boolean itemCountDirty

Constructor Detail

VirtualContainerBaseback to summary
public VirtualContainerBase(final C control)

Constructor for subclasses to call.

Parameters
control:C

the control

Method Detail

checkStateback to summary
pack-priv void checkState()
createVirtualFlowback to summary
protected VirtualFlow<I> createVirtualFlow()

Create the virtualized container that handles the layout and scrolling of all the cells. This enables skin subclasses to provide a custom VirtualFlow implementation. If not overridden, this method instantiates a default VirtualFlow instance.

Returns:VirtualFlow<I>

newly created VirtualFlow instance

Since
10
disposeback to summary
public void dispose()

Overrides javafx.scene.control.SkinBase.dispose.

Implements javafx.scene.control.Skin.dispose.

Doc from javafx.scene.control.SkinBase.dispose.

Called when a previously installed skin is about to be removed from its associated control. This allows the skin to do clean up, like removing listeners and bindings, and undo any changes to the control's properties. After this method completes, getSkinnable() and getNode() should return null.

Calling dispose() more than once has no effect.

Overridden to remove EventHandler.

Annotations
@Override
getItemCountback to summary
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:int

the total number of items in this container

getMaxCellWidthback to summary
pack-priv double getMaxCellWidth(int rowsToCount)
getVirtualFlowback to summary
protected final VirtualFlow<I> getVirtualFlow()

Get the virtualized container. Subclasses can invoke this method to get the VirtualFlow instance.

Returns:VirtualFlow<I>

the virtualized container

Since
10
getVirtualFlowPreferredHeightback to summary
pack-priv double getVirtualFlowPreferredHeight(int rows)
layoutChildrenback to summary
protected void layoutChildren(double x, double y, double w, double h)

Overrides javafx.scene.control.SkinBase.layoutChildren.

Doc from javafx.scene.control.SkinBase.layoutChildren.

Called during the layout pass of the scenegraph.

Parameters
x:double

the x position

y:double

the y position

w:double

the width

h:double

the height

Annotations
@Override
markItemCountDirtyback to summary
protected final void markItemCountDirty()

Call this method to indicate that the item count should be updated on the next pulse.

requestRebuildCellsback to summary
pack-priv void requestRebuildCells()
updateItemCountback to summary
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 the getItemCount method.