Record Class GuiPageTemplate
java.lang.Object
java.lang.Record
com.render.api.gui.pagination.GuiPageTemplate
- Record Components:
name- stable template namemargins- page content marginsheader- running header factory, ornull- running footer factory, ornull
public record GuiPageTemplate(String name, GuiPageMargins margins, Function<GuiPageContext, net.minecraft.network.chat.Component> header, Function<GuiPageContext, net.minecraft.network.chat.Component> footer)
extends Record
Named on-screen page template with margins and running text factories.
-
Constructor Summary
ConstructorsConstructorDescriptionGuiPageTemplate(String name, GuiPageMargins margins, Function<GuiPageContext, net.minecraft.network.chat.Component> header, Function<GuiPageContext, net.minecraft.network.chat.Component> footer) Creates an instance of aGuiPageTemplaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Function<GuiPageContext, net.minecraft.network.chat.Component> footer()Returns the value of thefooterrecord component.final inthashCode()Returns a hash code value for this object.Function<GuiPageContext, net.minecraft.network.chat.Component> header()Returns the value of theheaderrecord component.margins()Returns the value of themarginsrecord component.name()Returns the value of thenamerecord component.static GuiPageTemplatenamed(String name, GuiPageMargins margins) final StringtoString()Returns a string representation of this record class.withFooter(Function<GuiPageContext, net.minecraft.network.chat.Component> factory) withHeader(Function<GuiPageContext, net.minecraft.network.chat.Component> factory)
-
Constructor Details
-
GuiPageTemplate
public GuiPageTemplate(String name, GuiPageMargins margins, Function<GuiPageContext, net.minecraft.network.chat.Component> header, Function<GuiPageContext, net.minecraft.network.chat.Component> footer) Creates an instance of aGuiPageTemplaterecord class.
-
-
Method Details
-
named
-
withHeader
public GuiPageTemplate withHeader(Function<GuiPageContext, net.minecraft.network.chat.Component> factory) -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
margins
-
header
-