Record Class FoliosBook.CoverText
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.FoliosBook.CoverText
- Record Components:
title- null for the model's own placesubtitle- 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 placesummaryText- raw; empty for none
- Enclosing class:
FoliosBook
public static record FoliosBook.CoverText(@Nullable FoliosBook.CoverText.Line title, @Nullable FoliosBook.CoverText.Line subtitle, @Nullable FoliosBook.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.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA line of lettering: its middle (x, y), how large, and how much room it has across. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final FoliosBook.CoverTextstatic final FoliosBook.CoverText.Linestatic final FoliosBook.CoverText.Line -
Constructor Summary
ConstructorsConstructorDescriptionCoverText(@Nullable FoliosBook.CoverText.Line title, @Nullable FoliosBook.CoverText.Line subtitle) CoverText(@Nullable FoliosBook.CoverText.Line title, @Nullable FoliosBook.CoverText.Line subtitle, @Nullable FoliosBook.CoverText.Line summary, String summaryText) Creates an instance of aCoverTextrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@Nullable FoliosBook.CoverText.Linesubtitle()Returns the value of thesubtitlerecord component.subtitleOr(FoliosBook.CoverText.Line fallback) @Nullable FoliosBook.CoverText.Linesummary()Returns the value of thesummaryrecord component.Returns the value of thesummaryTextrecord component.@Nullable FoliosBook.CoverText.Linetitle()Returns the value of thetitlerecord component.titleOr(FoliosBook.CoverText.Line fallback) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TITLE
-
SUBTITLE
-
DEFAULT
-
-
Constructor Details
-
CoverText
public CoverText(@Nullable FoliosBook.CoverText.Line title, @Nullable FoliosBook.CoverText.Line subtitle) -
CoverText
public CoverText(@Nullable FoliosBook.CoverText.Line title, @Nullable FoliosBook.CoverText.Line subtitle, @Nullable FoliosBook.CoverText.Line summary, String summaryText) Creates an instance of aCoverTextrecord class.- Parameters:
title- the value for thetitlerecord componentsubtitle- the value for thesubtitlerecord componentsummary- the value for thesummaryrecord componentsummaryText- the value for thesummaryTextrecord component
-
-
Method Details
-
titleOr
-
subtitleOr
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
title
-
subtitle
-
summary
-
summaryText
Returns the value of thesummaryTextrecord component.- Returns:
- the value of the
summaryTextrecord component
-