Class VSPUtils

java.lang.Object
io.github.palexdev.virtualizedfx.utils.VSPUtils

public class VSPUtils extends Object
Class that offers various utilities for VirtualScrollPane
  • Method Details

    • wrap

      public static <T, C extends Cell<T>> VirtualScrollPane wrap(VirtualFlow<T,C> flow)
      Does the hard job for you by creating a new VirtualScrollPane wrapping the given VirtualFlow, initializing the needed bindings for the content bounds, the scrolling and the orientation.

      NOTE: once this is not needed anymore you should call disposeFor(VirtualScrollPane) to avoid memory leaks which may occur because of MFXBindings.
    • wrap

      public static <T, C extends Cell<T>> VirtualScrollPane wrap(PaginatedVirtualFlow<T,C> flow)
      Does the hard job for you by creating a new VirtualScrollPane wrapping the given PaginatedVirtualFlow, initializing the needed bindings for the content bounds, the scrolling and the orientation.
    • wrap

      public static <T, C extends GridCell<T>> VirtualScrollPane wrap(VirtualGrid<T,C> grid)
      Does the hard job for you by creating a new VirtualScrollPane wrapping the given VirtualGrid, initializing the needed bindings for the content bounds, the scrolling and the orientation.

      NOTE: once this is not needed anymore you should call disposeFor(VirtualScrollPane) to avoid memory leaks which may occur because of MFXBindings
    • wrap

      public static <T, C extends GridCell<T>> VirtualScrollPane wrap(PaginatedVirtualGrid<T,C> grid)
      Does the hard job for you by creating a new VirtualScrollPane wrapping the given PaginatedVirtualFlow, initializing the needed bindings for the content bounds, the scrolling and the orientation.

      NOTE: once this is not needed anymore you should call disposeFor(VirtualScrollPane) to avoid memory leaks which may occur because of MFXBindings and When.
    • wrap

      public static <T> VirtualScrollPane wrap(VirtualTable<T> table)
    • wrap

      public static <T> VirtualScrollPane wrap(PaginatedVirtualTable<T> table)
    • setHSpeed

      public static void setHSpeed(VirtualScrollPane vsp, double unitIncrement, double smoothUnit, double trackIncrement)
      Sets the horizontal scroll speed for the given VirtualScrollPane.
      Parameters:
      unitIncrement - the amount of pixels to scroll when using buttons or mouse scroll
      smoothUnit - the amount of pixels to scroll when smooth scrolling with the mouse
      trackIncrement - the amount of pixels to scroll when using the track
    • setVSpeed

      public static void setVSpeed(VirtualScrollPane vsp, double unitIncrement, double smoothUnit, double trackIncrement)
      Sets the vertical scroll speed for the given VirtualScrollPane.
      Parameters:
      unitIncrement - the amount of pixels to scroll when using buttons or mouse scroll
      smoothUnit - the amount of pixels to scroll when smooth scrolling with the mouse
      trackIncrement - the amount of pixels to scroll when using the track
    • disposeFor

      public static void disposeFor(VirtualScrollPane vsp)
      Disposes the bindings created by the various wrap() methods