Record Class GuiLayoutFragment

java.lang.Object
java.lang.Record
com.render.api.gui.layout.GuiLayoutFragment
Record Components:
source - retained source component
borderBox - final border box
contentBox - final content box
baseline - baseline in design-space coordinates
lineIndex - inline/flex line index, or -1
rowIndex - grid row index, or -1
columnIndex - grid column index, or -1

public record GuiLayoutFragment(GuiComponent<?> source, GuiRect borderBox, GuiRect contentBox, float baseline, int lineIndex, int rowIndex, int columnIndex) extends Record
Immutable final geometry produced by the modern arrange pass.
  • Constructor Details

    • GuiLayoutFragment

      public GuiLayoutFragment(GuiComponent<?> source, GuiRect borderBox, GuiRect contentBox, float baseline, int lineIndex, int rowIndex, int columnIndex)
      Creates an instance of a GuiLayoutFragment record class.
      Parameters:
      source - the value for the source record component
      borderBox - the value for the borderBox record component
      contentBox - the value for the contentBox record component
      baseline - the value for the baseline record component
      lineIndex - the value for the lineIndex record component
      rowIndex - the value for the rowIndex record component
      columnIndex - the value for the columnIndex record component
  • Method Details

    • 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. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      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.
    • source

      public GuiComponent<?> source()
      Returns the value of the source record component.
      Returns:
      the value of the source record component
    • borderBox

      public GuiRect borderBox()
      Returns the value of the borderBox record component.
      Returns:
      the value of the borderBox record component
    • contentBox

      public GuiRect contentBox()
      Returns the value of the contentBox record component.
      Returns:
      the value of the contentBox record component
    • baseline

      public float baseline()
      Returns the value of the baseline record component.
      Returns:
      the value of the baseline record component
    • lineIndex

      public int lineIndex()
      Returns the value of the lineIndex record component.
      Returns:
      the value of the lineIndex record component
    • rowIndex

      public int rowIndex()
      Returns the value of the rowIndex record component.
      Returns:
      the value of the rowIndex record component
    • columnIndex

      public int columnIndex()
      Returns the value of the columnIndex record component.
      Returns:
      the value of the columnIndex record component