Module MaterialFX

Class MFXPaginationSkin

java.lang.Object
javafx.scene.control.SkinBase<MFXPagination>
io.github.palexdev.materialfx.skins.MFXPaginationSkin
All Implemented Interfaces:
Skin<MFXPagination>

public class MFXPaginationSkin extends SkinBase<MFXPagination>
This is the default skin implementation for MFXPagination.

The top container and the pane containing the pages are dynamically built and replaced accordingly to the current MFXPagination.orientationProperty().

The skin is also responsible for building and managing the pages.

  • Constructor Details

    • MFXPaginationSkin

      public MFXPaginationSkin(MFXPagination pagination)
  • Method Details

    • buildContainer

      protected Pane buildContainer()
      Responsible for building the top container according to the pagination's orientation.
    • buildBar

      protected void buildBar()
      Responsible for building the pages' container according to the pagination's orientation.
    • buildPages

      protected void buildPages()
      Responsible for building the pages or updating them if re-building them is not needed.

      Also, if the pages list is not empty, and to improve performance, if more or less pages are needed supplyPages(int) is used.

    • supplyPages

      protected void supplyPages(int num)
      Builds additional pages according to the given number.

      If it is less than 0, then pages are removed.

    • updatePages

      protected void updatePages()
      Computes the indexes list using MFXPagination.indexesSupplierProperty() and updates the built pages using MFXPage.updateItem(Integer).
    • updateBetweens

      protected void updateBetweens()
      All MFXPages have a NumberRange field that specifies the range of truncated pages.

      Truncated pages use this property to show a popup containing the list of hidden pages, making the navigation faster and easier.

      This method is responsible for properly updating such property.

    • computeMaxWidth

      protected double computeMaxWidth(double height, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxWidth in class SkinBase<MFXPagination>
    • computeMaxHeight

      protected double computeMaxHeight(double width, double topInset, double rightInset, double bottomInset, double leftInset)
      Overrides:
      computeMaxHeight in class SkinBase<MFXPagination>