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, width
Fields 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 PagedComponent
Create a new instance of the GUI component.void
deserialize
(@NotNull ParserContext node) Deserialize the properties of the GUI component from the provided ParserContext node.@NotNull PagedComponentBuilder
setParent
(@NotNull ParserContext parent) Sets the parent parser context containing the GUI definition.@NotNull PagedComponentBuilder
setPattern
(int[] pattern) Sets the pattern of slots on the GUI to arrange the components.@NotNull PagedComponentBuilder
setShowingPage
(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, setWidth
Methods 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:GuiComponentBuilder
Create a new instance of the GUI component.- Specified by:
createComponent
in interfaceGuiComponentBuilder
- Overrides:
createComponent
in classEmbeddedGuiComponentBuilder<PagedComponentBuilder>
- Returns:
- A new instance of the GUI component.
-
deserialize
Description copied from class:AbstractGuiComponentBuilder
Deserialize the properties of the GUI component from the provided ParserContext node.- Specified by:
deserialize
in interfaceGuiComponentBuilder
- Overrides:
deserialize
in 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.
-