Record Class GuideBook.CoverText

java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideBook.CoverText
Record Components:
title - null for the model's own place
subtitle - null for the model's own place (or, with a summary, under the title)
summary - where the summary goes; null for the model's own place
summaryText - raw; empty for none
Enclosing class:
GuideBook

public static record GuideBook.CoverText(@Nullable GuideBook.CoverText.Line title, @Nullable GuideBook.CoverText.Line subtitle, @Nullable GuideBook.CoverText.Line summary, String summaryText) extends Record
Where a book's name and subtitle are lettered on its cover, on the book item and a handheld book alike: "cover_text" in book.json. Places are in the item model's units, the cover running from 3 to 13 across and 1 (its foot) to 15 (its head) up, as the default model's front board does.

 "cover_text": {
   "title":    {"x": 8, "y": 11.6, "size": 1.15, "width": 6.4},  // its middle; how large (1: a line 1.6 units tall); the room across
   "subtitle": {"x": 8, "y": 4.05, "size": 0.85, "width": 6.4}
 }
 
A line longer than its room shrinks to fit. Anything left out keeps its default; a book that says nothing keeps where its item model's folios:guide_cover_text puts them. With a "summary", the name and the subtitle under it, smaller, share the title plate, and the summary (up to two lines) has the lower plate.
  • Field Details

  • Constructor Details

  • Method Details

    • titleOr

    • subtitleOr

      public GuideBook.CoverText.Line subtitleOr(GuideBook.CoverText.Line fallback)
    • 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.
    • title

      @Nullable public @Nullable GuideBook.CoverText.Line title()
      Returns the value of the title record component.
      Returns:
      the value of the title record component
    • subtitle

      @Nullable public @Nullable GuideBook.CoverText.Line subtitle()
      Returns the value of the subtitle record component.
      Returns:
      the value of the subtitle record component
    • summary

      @Nullable public @Nullable GuideBook.CoverText.Line summary()
      Returns the value of the summary record component.
      Returns:
      the value of the summary record component
    • summaryText

      public String summaryText()
      Returns the value of the summaryText record component.
      Returns:
      the value of the summaryText record component