Class PaginationBox

Direct Known Subclasses:
CommandListBox, PaginationBox.MergedPaginationBox, SelectionCommands.BlockDistributionResult, SideEffectBox

public abstract class PaginationBox extends MessageBox
  • Constructor Details

    • PaginationBox

      protected PaginationBox(String title)
      Creates a Paginated component
      Parameters:
      title - The title
    • PaginationBox

      protected PaginationBox(String title, @Nullable String pageCommand)
      Creates a Paginated component
      Parameters:
      title - The title
      pageCommand - The command to run to switch page, with %page% representing page number
  • Method Details

    • getComponent

      public abstract com.sk89q.worldedit.util.formatting.text.Component getComponent(int number)
    • getComponentsSize

      public abstract int getComponentsSize()
    • setComponentsPerPage

      public void setComponentsPerPage(int componentsPerPage)
    • formatForConsole

      public void formatForConsole()
    • getCurrentPage

      protected final int getCurrentPage()
    • create

      public com.sk89q.worldedit.util.formatting.text.Component create(int page) throws InvalidComponentException
      Throws:
      InvalidComponentException
    • create

      public com.sk89q.worldedit.util.formatting.text.TextComponent create()
      Description copied from class: TextComponentProducer
      Create a TextComponent from this producer.
      Overrides:
      create in class MessageBox
      Returns:
      The component
    • fromStrings

      public static <T> PaginationBox fromStrings(String header, @Nullable String pageCommand, Collection<T> lines, com.google.common.base.Function<T,com.sk89q.worldedit.util.formatting.text.Component> adapt)
    • fromStrings

      public static PaginationBox fromStrings(String header, @Nullable String pageCommand, Collection<String> lines)
    • fromComponents

      public static PaginationBox fromComponents(String header, @Nullable String pageCommand, Collection<com.sk89q.worldedit.util.formatting.text.Component> lines)