Record Class KitMetrics

java.lang.Object
java.lang.Record
dev.boze.api.gui.kit.KitMetrics
Record Components:
unit - Base spacing; layouts are expressed in multiples of it
textScale - Text scale
iconScale - Icon scale
rowHeight - Height of one setting row
shadow - Whether text is drawn with a shadow

public record KitMetrics(double unit, double textScale, double iconScale, double rowHeight, boolean shadow) extends Record
Sizes the built-in editor layouts are built from.
  • Constructor Summary

    Constructors
    Constructor
    Description
    KitMetrics(double unit, double textScale, double iconScale, double rowHeight, boolean shadow)
    Creates an instance of a KitMetrics record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the iconScale record component.
    double
    Returns the value of the rowHeight record component.
    boolean
    Returns the value of the shadow record component.
    double
    Returns the value of the textScale record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the unit record component.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • KitMetrics

      public KitMetrics(double unit, double textScale, double iconScale, double rowHeight, boolean shadow)
      Creates an instance of a KitMetrics record class.
      Parameters:
      unit - the value for the unit record component
      textScale - the value for the textScale record component
      iconScale - the value for the iconScale record component
      rowHeight - the value for the rowHeight record component
      shadow - the value for the shadow 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. All components in this record class 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.
    • unit

      public double unit()
      Returns the value of the unit record component.
      Returns:
      the value of the unit record component
    • textScale

      public double textScale()
      Returns the value of the textScale record component.
      Returns:
      the value of the textScale record component
    • iconScale

      public double iconScale()
      Returns the value of the iconScale record component.
      Returns:
      the value of the iconScale record component
    • rowHeight

      public double rowHeight()
      Returns the value of the rowHeight record component.
      Returns:
      the value of the rowHeight record component
    • shadow

      public boolean shadow()
      Returns the value of the shadow record component.
      Returns:
      the value of the shadow record component