Class Page

java.lang.Object
net.tnemc.menu.core.Page
Direct Known Subclasses:
PlayerInstancePage

public class Page extends Object
Page
Since:
1.5.0.0
Author:
creatorfromhell
  • Field Details

  • Constructor Details

    • Page

      public Page(int pageNumber)
  • Method Details

    • number

      public int number()
    • setRow

      public void setRow(int row, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified row.
      Parameters:
      row - The row index where the icons will be set. Rows are indexed starting from 1, through MenuManager.ROW_SIZE.
      iconBuilder - The IconBuilder used to construct the icons for the specified row.
    • setRow

      public void setRow(int row, int startingColumn, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified row.
      Parameters:
      row - The row index where the icons will be set. Rows are indexed starting from 1, through MenuManager.ROW_SIZE.
      startingColumn - The column to start applying the icons on, inclusive.
      iconBuilder - The IconBuilder used to construct the icons for the specified row.
    • setRow

      public void setRow(int row, int startingColumn, int endingColumn, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified row.
      Parameters:
      row - The row index where the icons will be set. Rows are indexed starting from 1, through MenuManager.ROW_SIZE.
      startingColumn - The column to start applying the icons on, inclusive.
      endingColumn - The column to stop applying the icons on, inclusive.
      iconBuilder - The IconBuilder used to construct the icons for the specified row.
    • setColumn

      public void setColumn(int menuRows, int column, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified column.
      Parameters:
      menuRows - The number of rows that the menu has.
      column - The column index where the icons will be set. Columns are indexed starting from 1.
      iconBuilder - The IconBuilder used to construct the icons for the specified column.
    • setColumn

      public void setColumn(int menuRows, int startingRow, int column, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified column.
      Parameters:
      menuRows - The number of rows that the menu has.
      startingRow - The row that the icons should start at, inclusive.
      column - The column index where the icons will be set. Columns are indexed starting from 1.
      iconBuilder - The IconBuilder used to construct the icons for the specified column.
    • setColumn

      public void setColumn(int menuRows, int startingRow, int endingRow, int column, IconBuilder iconBuilder)
      Sets the specified IconBuilder to the specified column.
      Parameters:
      menuRows - The number of rows that the menu has.
      startingRow - The row that the icons should start at, inclusive.
      endingRow - The row that the icons should end at, inclusive.
      column - The column index where the icons will be set. Columns are indexed starting from 1.
      iconBuilder - The IconBuilder used to construct the icons for the specified column.
    • onClick

      public boolean onClick(MenuClickHandler handler)
      Handles a click action for a specific viewer identified by its UUID.
      Parameters:
      handler - The MenuClickHandler for the click.
      Returns:
      true if the click action is blocked, indicating that it should be prevented, false if the click action is allowed to proceed.
    • addIcon

      public void addIcon(Icon icon)
    • getIcons

      public Map<Integer,Icon> getIcons()
    • getOpen

      public Consumer<PageOpenCallback> getOpen()
    • setOpen

      public void setOpen(Consumer<PageOpenCallback> open)
    • getClickHandler

      public Function<MenuClickHandler,Boolean> getClickHandler()
    • setClickHandler

      public void setClickHandler(Function<MenuClickHandler,Boolean> clickHandler)