Module javafx.controls
Package javafx.scene.control.skin

# Class ListViewSkin<T>

java.lang.Object
javafx.scene.control.SkinBase<C>
javafx.scene.control.skin.VirtualContainerBase<ListView<T>,ListCell<T>>
javafx.scene.control.skin.ListViewSkin<T>

All Implemented Interfaces:
  `Skin<ListView<T>>`

public class ListViewSkin<T> extends VirtualContainerBase<ListView<T>,ListCell<T>>
Default skin implementation for the `ListView` control.

Since:
  9
See Also:
  - `ListView`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ListViewSkin(ListView<T> control)`
  Creates a new ListViewSkin instance, installing the necessary child nodes into the Control `children` list, as well as the necessary input mappings for handling key, mouse, etc events.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `protected 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`
  `updateItemCount()`
  This method is called when it is possible that the item count has changed (i.e.

  ### Methods declared in class javafx.scene.control.skin.VirtualContainerBase

  `createVirtualFlow, dispose, getVirtualFlow, markItemCountDirty`

  ### Methods declared in class javafx.scene.control.SkinBase

  `computeBaselineOffset, computeMaxHeight, computeMaxWidth, computeMinHeight, computeMinWidth, computePrefHeight, computePrefWidth, consumeMouseEvents, executeAccessibleAction, getChildren, getClassCssMetaData, getCssMetaData, getNode, getSkinnable, 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`

  ### Methods declared in interface javafx.scene.control.Skin

  `install`

- ## Constructor Details

  - ### ListViewSkin

    public ListViewSkin(ListView<T> control)
    Creates a new ListViewSkin instance, installing the necessary child nodes into the Control `children` list, as well as the necessary input mappings for handling key, mouse, etc events.
    Parameters:
      `control` - The control that this skin should be installed onto.

- ## Method Details

  - ### getItemCount

    protected int getItemCount()
    Returns the total number of items in this container, including those that are currently hidden because they are out of view.
    Specified by:
      `getItemCount` in class `VirtualContainerBase<ListView<T>,ListCell<T>>`
    Returns:
      the total number of items in this container

  - ### updateItemCount

    protected 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 `VirtualContainerBase.getItemCount()` method.
    Specified by:
      `updateItemCount` in class `VirtualContainerBase<ListView<T>,ListCell<T>>`