Class VirtualContainerBase<C extends Control,I extends IndexedCell>

All Implemented Interfaces:
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.
  • Constructor Details

    • VirtualContainerBase

      public VirtualContainerBase(C control)
      Constructor for subclasses to call.
      control - the control
  • Method Details

    • 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.
      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 the getItemCount() method.
    • createVirtualFlow

      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 intantiates a default VirtualFlow instance.
      newly created VirtualFlow instance
    • dispose

      public void 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, Skin.getSkinnable() and Skin.getNode() should return null.

      Calling Skin.dispose() more than once has no effect.

      Overridden to remove EventHandler.

    • getVirtualFlow

      protected final VirtualFlow<I> getVirtualFlow()
      Get the virtualized container. Subclasses can invoke this method to get the VirtualFlow instance.
      the virtualized container
    • markItemCountDirty

      protected final void markItemCountDirty()
      Call this method to indicate that the item count should be updated on the next pulse.