Interface VFXPaginated<T>

All Superinterfaces:
VFXContainer<T>
All Known Implementing Classes:
VFXPaginatedList

public interface VFXPaginated<T> extends VFXContainer<T>
Defines the common API for every paginated virtualized container offered by VirtualizedFX. Extends VFXContainer.
  • Property Details

  • Method Details

    • getPage

      default int getPage()
      Gets the value of the page property.
      Property description:
      Specifies the page at which the container is.
      Returns:
      the value of the page property
      See Also:
    • pageProperty

      IntegerProperty pageProperty()
      Specifies the page at which the container is.
      Returns:
      the page property
      See Also:
    • setPage

      default void setPage(int page)
      Sets the value of the page property.
      Property description:
      Specifies the page at which the container is.
      Parameters:
      page - the value for the page property
      See Also:
    • getMaxPage

      default int getMaxPage()
      Gets the value of the maxPage property.
      Property description:
      Specifies the maximum page index at which the container can go.
      Returns:
      the value of the maxPage property
      See Also:
    • maxPageProperty

      ReadOnlyIntegerProperty maxPageProperty()
      Specifies the maximum page index at which the container can go.
      Returns:
      the maxPage property
      See Also:
    • getCellsPerPage

      default int getCellsPerPage()
      Gets the value of the cellsPerPage property.
      Property description:
      Specifies the number of cells/items to show per each page.
      Returns:
      the value of the cellsPerPage property
      See Also:
    • cellsPerPageProperty

      IntegerProperty cellsPerPageProperty()
      Specifies the number of cells/items to show per each page.
      Returns:
      the cellsPerPage property
      See Also:
    • setCellsPerPage

      default void setCellsPerPage(int cellsPerPage)
      Sets the value of the cellsPerPage property.
      Property description:
      Specifies the number of cells/items to show per each page.
      Parameters:
      cellsPerPage - the value for the cellsPerPage property
      See Also:
    • next

      default void next()
      Goes to the next page if possible.
    • previous

      default void previous()
      Goes to the previous page if possible.
    • moveBy

      default void moveBy(int delta)
      Changes the page by the given delta.
    • findPageByIndex

      default int findPageByIndex(int index)
      Given an index, returns the page at which it would be displayed by the container.

      Note that this will never generate an exception, rather acts as follows for edge cases:

      - empty list or max page is 0 or index < 0: returns 0

      - index > size: returns max page

    • computeMaxPage

      default int computeMaxPage()
      Computes the maximum page index reachable by the container. This depends on the number of items and the number of cells/items per page.

      The exact formula is as follows: Math.max(0, ((int) Math.ceil(items / (double) cpp)) - 1)