Interface ViewerPage<T>

Type Parameters:
T - the type of the viewer
All Known Subinterfaces:
PlayerPage
All Known Implementing Classes:
DHHologram

public interface ViewerPage<T>
An extra interface for PagedHologram to change the page for the viewer
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getPage(T viewer)
    Get the current page of the viewer
    default void
    nextPage(T viewer)
    Go to the next page
    default void
    previousPage(T viewer)
    Go to the previous page
    void
    setPage(T viewer, int page)
    Change the page for the viewer.
  • Method Details

    • setPage

      void setPage(T viewer, int page)
      Change the page for the viewer. Implementations should check if the page is valid, and if not, change it to the closest valid page, or limit the page range from 0 to the maximum page (inclusive).
      Parameters:
      viewer - the viewer
      page - the page
    • getPage

      int getPage(T viewer)
      Get the current page of the viewer
      Parameters:
      viewer - the viewer
      Returns:
      the current page
    • nextPage

      default void nextPage(T viewer)
      Go to the next page
      Parameters:
      viewer - the viewer
    • previousPage

      default void previousPage(T viewer)
      Go to the previous page
      Parameters:
      viewer - the viewer