Record Class GuiAnchorPlacement
java.lang.Object
java.lang.Record
com.render.api.gui.layout.GuiAnchorPlacement
- Record Components:
anchorName- referenced anchor namearea- preferred areafallbacks- fallback areas in trial orderoffsetX- additional horizontal offsetoffsetY- additional vertical offsethideWhenMissing- whether the positioned box is hidden when the anchor is absent
public record GuiAnchorPlacement(String anchorName, GuiPositionArea area, List<GuiPositionArea> fallbacks, GuiLength offsetX, GuiLength offsetY, boolean hideWhenMissing)
extends Record
Anchor-position request with ordered fallback areas.
-
Constructor Summary
ConstructorsConstructorDescriptionGuiAnchorPlacement(String anchorName, GuiPositionArea area, List<GuiPositionArea> fallbacks, GuiLength offsetX, GuiLength offsetY, boolean hideWhenMissing) Creates an instance of aGuiAnchorPlacementrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theanchorNamerecord component.area()Returns the value of thearearecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefallbacksrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns the value of thehideWhenMissingrecord component.hideWhenMissing(boolean hide) static GuiAnchorPlacementof(String anchorName, GuiPositionArea area) offsetX()Returns the value of theoffsetXrecord component.offsetY()Returns the value of theoffsetYrecord component.final StringtoString()Returns a string representation of this record class.withFallbacks(GuiPositionArea... areas) withOffset(GuiLength x, GuiLength y)
-
Constructor Details
-
GuiAnchorPlacement
public GuiAnchorPlacement(String anchorName, GuiPositionArea area, List<GuiPositionArea> fallbacks, GuiLength offsetX, GuiLength offsetY, boolean hideWhenMissing) Creates an instance of aGuiAnchorPlacementrecord class.- Parameters:
anchorName- the value for theanchorNamerecord componentarea- the value for thearearecord componentfallbacks- the value for thefallbacksrecord componentoffsetX- the value for theoffsetXrecord componentoffsetY- the value for theoffsetYrecord componenthideWhenMissing- the value for thehideWhenMissingrecord component
-
-
Method Details
-
of
-
withFallbacks
-
withOffset
-
hideWhenMissing
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
anchorName
Returns the value of theanchorNamerecord component.- Returns:
- the value of the
anchorNamerecord component
-
area
-
fallbacks
-
offsetX
-
offsetY
-
hideWhenMissing
public boolean hideWhenMissing()Returns the value of thehideWhenMissingrecord component.- Returns:
- the value of the
hideWhenMissingrecord component
-