Class PagedComponentBuilder
java.lang.Object
io.github.toberocat.guiengine.components.AbstractGuiComponentBuilder<B>
io.github.toberocat.guiengine.components.provided.embedded.EmbeddedGuiComponentBuilder<PagedComponentBuilder>
io.github.toberocat.guiengine.components.provided.paged.PagedComponentBuilder
- All Implemented Interfaces:
GuiComponentBuilder
A builder class for creating PagedComponent instances.
Created: 30.04.2023
- Author:
- Tobias Madlberger (Tobias)
-
Field Summary
Fields inherited from class io.github.toberocat.guiengine.components.provided.embedded.EmbeddedGuiComponentBuilder
copyAir, height, interactions, targetGui, widthFields inherited from class io.github.toberocat.guiengine.components.AbstractGuiComponentBuilder
clickFunctions, closeFunctions, dragFunctions, hidden, id, priority, x, y -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull PagedComponentCreate a new instance of the GUI component.voiddeserialize(@NotNull ParserContext node) Deserialize the properties of the GUI component from the provided ParserContext node.@NotNull PagedComponentBuildersetParent(@NotNull ParserContext parent) Sets the parent parser context containing the GUI definition.@NotNull PagedComponentBuildersetPattern(int[] pattern) Sets the pattern of slots on the GUI to arrange the components.@NotNull PagedComponentBuildersetShowingPage(int showingPage) Sets the index of the currently showing page.Methods inherited from class io.github.toberocat.guiengine.components.provided.embedded.EmbeddedGuiComponentBuilder
deserialize, setCopyAir, setHeight, setInteractions, setTargetGui, setWidthMethods inherited from class io.github.toberocat.guiengine.components.AbstractGuiComponentBuilder
getId, self, setClickFunctions, setCloseFunctions, setDragFunctions, setHidden, setId, setPriority, setX, setY
-
Constructor Details
-
PagedComponentBuilder
public PagedComponentBuilder()
-
-
Method Details
-
setPattern
Sets the pattern of slots on the GUI to arrange the components.- Parameters:
pattern- The pattern of slots as an integer array.- Returns:
- The builder instance.
-
setParent
Sets the parent parser context containing the GUI definition.- Parameters:
parent- The parent parser context.- Returns:
- The builder instance.
-
setShowingPage
Sets the index of the currently showing page.- Parameters:
showingPage- The index of the currently showing page.- Returns:
- The builder instance.
-
createComponent
Description copied from interface:GuiComponentBuilderCreate a new instance of the GUI component.- Specified by:
createComponentin interfaceGuiComponentBuilder- Overrides:
createComponentin classEmbeddedGuiComponentBuilder<PagedComponentBuilder>- Returns:
- A new instance of the GUI component.
-
deserialize
Description copied from class:AbstractGuiComponentBuilderDeserialize the properties of the GUI component from the provided ParserContext node.- Specified by:
deserializein interfaceGuiComponentBuilder- Overrides:
deserializein classEmbeddedGuiComponentBuilder<PagedComponentBuilder>- Parameters:
node- The ParserContext node containing the properties of the GUI component.- Throws:
IOException- If there is an error while deserializing the properties.
-