Record Class GuiBorder

java.lang.Object
java.lang.Record
com.render.api.gui.paint.GuiBorder
Record Components:
top - physical top side
right - physical right side
bottom - physical bottom side
left - physical left side
inlineStart - optional logical inline-start override
inlineEnd - optional logical inline-end override
blockStart - optional logical block-start override
blockEnd - optional logical block-end override
radii - elliptical corner radii
image - optional sliced border image

public record GuiBorder(GuiBorderSide top, GuiBorderSide right, GuiBorderSide bottom, GuiBorderSide left, GuiBorderSide inlineStart, GuiBorderSide inlineEnd, GuiBorderSide blockStart, GuiBorderSide blockEnd, GuiCornerRadii radii, GuiBorderImage image) extends Record
Immutable per-side border, corner, logical-side, and border-image value.
  • Constructor Details

  • Method Details

    • uniform

      public static GuiBorder uniform(float width, GuiBorderStyle style, RenderColor color, float radius)
    • solid

      public static GuiBorder solid(float width, RenderColor color, float radius)
    • withRadii

      public GuiBorder withRadii(GuiCornerRadii value)
    • withImage

      public GuiBorder withImage(GuiBorderImage value)
    • withLogicalSides

      public GuiBorder withLogicalSides(GuiBorderSide inlineStart, GuiBorderSide inlineEnd, GuiBorderSide blockStart, GuiBorderSide blockEnd)
    • resolve

      public GuiBorder resolve(boolean rightToLeft)
    • isUniformSolidCircular

      public boolean isUniformSolidCircular()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • top

      public GuiBorderSide top()
      Returns the value of the top record component.
      Returns:
      the value of the top record component
    • right

      public GuiBorderSide right()
      Returns the value of the right record component.
      Returns:
      the value of the right record component
    • bottom

      public GuiBorderSide bottom()
      Returns the value of the bottom record component.
      Returns:
      the value of the bottom record component
    • left

      public GuiBorderSide left()
      Returns the value of the left record component.
      Returns:
      the value of the left record component
    • inlineStart

      public GuiBorderSide inlineStart()
      Returns the value of the inlineStart record component.
      Returns:
      the value of the inlineStart record component
    • inlineEnd

      public GuiBorderSide inlineEnd()
      Returns the value of the inlineEnd record component.
      Returns:
      the value of the inlineEnd record component
    • blockStart

      public GuiBorderSide blockStart()
      Returns the value of the blockStart record component.
      Returns:
      the value of the blockStart record component
    • blockEnd

      public GuiBorderSide blockEnd()
      Returns the value of the blockEnd record component.
      Returns:
      the value of the blockEnd record component
    • radii

      public GuiCornerRadii radii()
      Returns the value of the radii record component.
      Returns:
      the value of the radii record component
    • image

      public GuiBorderImage image()
      Returns the value of the image record component.
      Returns:
      the value of the image record component