Class PaginationBox
java.lang.Object
com.sk89q.worldedit.util.formatting.component.TextComponentProducer
com.sk89q.worldedit.util.formatting.component.MessageBox
com.sk89q.worldedit.util.formatting.component.PaginationBox
- Direct Known Subclasses:
CommandListBox
,SideEffectBox
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
PaginationBox(String title)
Creates a Paginated component.protected
PaginationBox(String title, String pageCommand)
Creates a Paginated component. -
Method Summary
Modifier and TypeMethodDescriptioncom.sk89q.worldedit.util.formatting.text.TextComponent
create()
Create a TextComponent from this producer.com.sk89q.worldedit.util.formatting.text.Component
create(int page)
void
static PaginationBox
fromComponents(String header, String pageCommand, List<com.sk89q.worldedit.util.formatting.text.Component> lines)
static PaginationBox
fromStrings(String header, String pageCommand, List<String> lines)
abstract com.sk89q.worldedit.util.formatting.text.Component
getComponent(int number)
abstract int
protected int
void
setComponentsPerPage(int componentsPerPage)
Methods inherited from class com.sk89q.worldedit.util.formatting.component.MessageBox
centerAndBorder, getContents
Methods inherited from class com.sk89q.worldedit.util.formatting.component.TextComponentProducer
append, append, getBuilder, newline, reset
-
Constructor Details
-
PaginationBox
Creates a Paginated component.- Parameters:
title
- The title
-
PaginationBox
Creates a Paginated component.- Parameters:
title
- The titlepageCommand
- 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 classMessageBox
- Returns:
- The component
-
fromStrings
public static PaginationBox fromStrings(String header, @Nullable String pageCommand, List<String> lines) -
fromComponents
public static PaginationBox fromComponents(String header, @Nullable String pageCommand, List<com.sk89q.worldedit.util.formatting.text.Component> lines)
-