Module MaterialFX

Class MFXPaginatedTableView<T>

Type Parameters:
T - The type of the data within the table.
All Implemented Interfaces:
Styleable, EventTarget, Skinnable

public class MFXPaginatedTableView<T> extends MFXTableView<T>
This is the implementation of a paginated MFXTableView.

This table view introduces 4 new properties:

- the current page

- the total number of pages (max page)

- The number of pages to show in the pagination control, pagesToShowProperty()

- The number of rows per page

This table view extends MFXTableView because it uses the same system (uses a virtual flow), the page navigation is just a trick. The scroll bars are hidden and the scroll value is handled/updated when changing the page.
  • Property Details

  • Constructor Details

    • MFXPaginatedTableView

      public MFXPaginatedTableView()
    • MFXPaginatedTableView

      public MFXPaginatedTableView(ObservableList<T> items)
  • Method Details

    • goToPage

      public void goToPage(int index)
      Goes to the given page index.

      The given integer is clamped between 1 and the max page index.

    • scrollBy

      public void scrollBy(double pixels)
      Unsupported by the paginated table view.
      Overrides:
      scrollBy in class MFXTableView<T>
    • scrollTo

      public void scrollTo(int index)
      Overrides:
      scrollTo in class MFXTableView<T>
    • scrollToFirst

      public void scrollToFirst()
      Goes to the first page.
      Overrides:
      scrollToFirst in class MFXTableView<T>
    • scrollToLast

      public void scrollToLast()
      Goes to the last page.
      Overrides:
      scrollToLast in class MFXTableView<T>
    • scrollToPixel

      public void scrollToPixel(double pixel)
      Unsupported by the paginated table view.
      Overrides:
      scrollToPixel in class MFXTableView<T>
    • createDefaultSkin

      protected Skin<?> createDefaultSkin()
      Overrides:
      createDefaultSkin in class MFXTableView<T>
    • getCurrentPage

      public int getCurrentPage()
      Gets the value of the property currentPage.
      Property description:
      Specifies the current shown page.
    • currentPageProperty

      public IntegerProperty currentPageProperty()
      Specifies the current shown page.
      See Also:
    • setCurrentPage

      public void setCurrentPage(int currentPage)
      Sets the value of the property currentPage.
      Property description:
      Specifies the current shown page.
    • getMaxPage

      public int getMaxPage()
      Gets the value of the property maxPage.
      Property description:
      Specifies the last page index.
    • maxPageProperty

      public ReadOnlyIntegerProperty maxPageProperty()
      Specifies the last page index.
      See Also:
    • setMaxPage

      protected void setMaxPage(int maxPage)
      Sets the value of the property maxPage.
      Property description:
      Specifies the last page index.
    • getPagesToShow

      public int getPagesToShow()
      Gets the value of the property pagesToShow.
      Property description:
      Specifies how many pages can be shown at a time by the MFXPagination control used in the skin.
    • pagesToShowProperty

      public IntegerProperty pagesToShowProperty()
      Specifies how many pages can be shown at a time by the MFXPagination control used in the skin.
      See Also:
    • setPagesToShow

      public void setPagesToShow(int pagesToShow)
      Sets the value of the property pagesToShow.
      Property description:
      Specifies how many pages can be shown at a time by the MFXPagination control used in the skin.
    • getRowsPerPage

      public int getRowsPerPage()
      Gets the value of the property rowsPerPage.
      Property description:
      Specifies how many rows the table can show per page.
    • rowsPerPageProperty

      public IntegerProperty rowsPerPageProperty()
      Specifies how many rows the table can show per page.
      See Also:
    • setRowsPerPage

      public void setRowsPerPage(int rowsPerPage)
      Sets the value of the property rowsPerPage.
      Property description:
      Specifies how many rows the table can show per page.