All Implemented Interfaces:
io.github.palexdev.virtualizedfx.cell.Cell<Integer>, Styleable, EventTarget, Skinnable

public class MFXPage extends Label implements io.github.palexdev.virtualizedfx.cell.Cell<Integer>
This is the default cell used by MFXPagination to show the page indexes.

It's a very basic cell that show's the page's index as text (since it extends Label), handles the selection state (according to MFXPagination.currentPageProperty()).

If the cells represents a truncated page, the text is specified by MFXPagination.ellipseStringProperty(). In this case the cell also allows to show a popup containing the hidden pages, for faster and easier navigation.

  • Property Details

  • Field Details

    • SELECTED_PSEUDO_CLASS

      protected static final PseudoClass SELECTED_PSEUDO_CLASS
  • Constructor Details

  • Method Details

    • showPopup

      protected void showPopup()
      If the page is truncated, shows a popup containing the hidden pages' indexes.
    • getNode

      public Node getNode()
      Specified by:
      getNode in interface io.github.palexdev.virtualizedfx.cell.Cell<Integer>
    • updateItem

      public void updateItem(Integer index)
      Specified by:
      updateItem in interface io.github.palexdev.virtualizedfx.cell.Cell<Integer>
    • getUserAgentStylesheet

      public String getUserAgentStylesheet()
      Overrides:
      getUserAgentStylesheet in class Region
    • getIndex

      public int getIndex()
      Gets the value of the property index.
      Property description:
      Specifies the page's index.
    • indexProperty

      public ReadOnlyIntegerProperty indexProperty()
      Specifies the page's index.
      See Also:
    • setIndex

      protected void setIndex(int index)
      Sets the value of the property index.
      Property description:
      Specifies the page's index.
    • getBetween

      public NumberRange<Integer> getBetween()
      Returns:
      the range of hidden pages, if truncated otherwise null
    • setBetween

      public void setBetween(NumberRange<Integer> between)
    • isSelected

      public boolean isSelected()
      Gets the value of the property selected.
      Property description:
      Specifies the selection state of the page.
    • selectedProperty

      public ReadOnlyBooleanProperty selectedProperty()
      Specifies the selection state of the page.
      See Also:
    • setSelected

      protected void setSelected(boolean selected)
      Sets the value of the property selected.
      Property description:
      Specifies the selection state of the page.