java.lang.Object
com.kamikazejam.kamicommon.menu.api.struct.paginated.layout.GridPaginationLayout
All Implemented Interfaces:
PaginationLayout

public class GridPaginationLayout extends Object implements PaginationLayout
Represents a layout for a PaginatedMenu where the available slots for page icons are defined as the grid between two positions (PositionIconSlot)
  • Constructor Details

  • Method Details

    • update

      public void update(@NotNull @NotNull PositionIconSlot a, @NotNull @NotNull PositionIconSlot b)
    • getSlots

      @NotNull public @NotNull Collection<Integer> getSlots(@NotNull @NotNull MenuSize size)
      Description copied from interface: PaginationLayout
      Get the slots of the menu that are used for the pages. Will use the ordering of the collection to place slots.
      Any slots that do not fall within the confines of the menu will be ignored.
      Specified by:
      getSlots in interface PaginationLayout
      Parameters:
      size - The MenuSize for generating an appropriate range of slots.
      Returns:
      The slots of the menu to place page items into.
    • getNextIconSlot

      @NotNull public @NotNull IconSlot getNextIconSlot(@NotNull @NotNull MenuSize size)
      Description copied from interface: PaginationLayout
      Get the slot that the next icon (if needed) will be placed into.
      If this slot is invalid (outside the menu), the icon will not be placed.
      Specified by:
      getNextIconSlot in interface PaginationLayout
    • getPrevIconSlot

      @NotNull public @NotNull IconSlot getPrevIconSlot(@NotNull @NotNull MenuSize size)
      Description copied from interface: PaginationLayout
      Get the slot that the previous icon (if needed) will be placed into.
      If this slot is invalid (outside the menu), the icon will not be placed.
      Specified by:
      getPrevIconSlot in interface PaginationLayout
    • copy

      @NotNull public @NotNull PaginationLayout copy()
      Specified by:
      copy in interface PaginationLayout