Record Class GuiCaretStyle

java.lang.Object
java.lang.Record
com.render.api.gui.GuiCaretStyle
Record Components:
shape - bar, block, or underscore geometry
paint - caret paint
width - explicit block/underscore width, or zero for automatic
thickness - bar or underscore thickness
visible - whether the caret may paint
animation - reusable visibility animation

public record GuiCaretStyle(GuiCaretStyle.Shape shape, GuiTextPaint paint, float width, float thickness, boolean visible, GuiCaretAnimation animation) extends Record
Immutable editable-text caret appearance.
  • Field Details

  • Constructor Details

    • GuiCaretStyle

      public GuiCaretStyle(GuiCaretStyle.Shape shape, GuiTextPaint paint, float width, float thickness, boolean visible, GuiCaretAnimation animation)
      Creates an instance of a GuiCaretStyle record class.
      Parameters:
      shape - the value for the shape record component
      paint - the value for the paint record component
      width - the value for the width record component
      thickness - the value for the thickness record component
      visible - the value for the visible record component
      animation - the value for the animation record component
  • Method Details

    • shape

      public GuiCaretStyle shape(GuiCaretStyle.Shape value)
    • paint

      public GuiCaretStyle paint(GuiTextPaint value)
    • width

      public GuiCaretStyle width(float value)
    • thickness

      public GuiCaretStyle thickness(float value)
    • animation

      public GuiCaretStyle animation(GuiCaretAnimation value)
    • visible

      public GuiCaretStyle visible(boolean value)
    • 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.
    • shape

      public GuiCaretStyle.Shape shape()
      Returns the value of the shape record component.
      Returns:
      the value of the shape record component
    • paint

      public GuiTextPaint paint()
      Returns the value of the paint record component.
      Returns:
      the value of the paint record component
    • width

      public float width()
      Returns the value of the width record component.
      Returns:
      the value of the width record component
    • thickness

      public float thickness()
      Returns the value of the thickness record component.
      Returns:
      the value of the thickness record component
    • visible

      public boolean visible()
      Returns the value of the visible record component.
      Returns:
      the value of the visible record component
    • animation

      public GuiCaretAnimation animation()
      Returns the value of the animation record component.
      Returns:
      the value of the animation record component