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

# Class TreeViewSkin<T>

java.lang.Object
javafx.scene.control.SkinBase<TreeView<T>>
javafx.scene.control.skin.VirtualContainerBase<TreeView<T>,TreeCell<T>>
javafx.scene.control.skin.TreeViewSkin<T>

Type Parameters:
  `T` - the type of the item contained within the `TreeItem` value property for all tree items in this TreeView

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

public class TreeViewSkin<T> extends VirtualContainerBase<TreeView<T>,TreeCell<T>>
Default skin implementation for the `TreeView` control.

Since:
  9
See Also:
  - `TreeView`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `TreeViewSkin(TreeView control)`
  Creates a new TreeViewSkin 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

  - ### TreeViewSkin

    public TreeViewSkin(TreeView control)
    Creates a new TreeViewSkin 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<TreeView<T>,TreeCell<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<TreeView<T>,TreeCell<T>>`