Package net.ixdarklord.folios.api.client
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 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:
- 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.-
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 GuideBook.CoverTextstatic final GuideBook.CoverText.Linestatic final GuideBook.CoverText.Line -
Constructor Summary
ConstructorsConstructorDescriptionCoverText(@Nullable GuideBook.CoverText.Line title, @Nullable GuideBook.CoverText.Line subtitle) CoverText(@Nullable GuideBook.CoverText.Line title, @Nullable GuideBook.CoverText.Line subtitle, @Nullable GuideBook.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 GuideBook.CoverText.Linesubtitle()Returns the value of thesubtitlerecord component.subtitleOr(GuideBook.CoverText.Line fallback) @Nullable GuideBook.CoverText.Linesummary()Returns the value of thesummaryrecord component.Returns the value of thesummaryTextrecord component.@Nullable GuideBook.CoverText.Linetitle()Returns the value of thetitlerecord component.titleOr(GuideBook.CoverText.Line fallback) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TITLE
-
SUBTITLE
-
DEFAULT
-
-
Constructor Details
-
CoverText
public CoverText(@Nullable @Nullable GuideBook.CoverText.Line title, @Nullable @Nullable GuideBook.CoverText.Line subtitle) -
CoverText
public CoverText(@Nullable @Nullable GuideBook.CoverText.Line title, @Nullable @Nullable GuideBook.CoverText.Line subtitle, @Nullable @Nullable GuideBook.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
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. -
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. -
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
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
subtitle
Returns the value of thesubtitlerecord component.- Returns:
- the value of the
subtitlerecord component
-
summary
Returns the value of thesummaryrecord component.- Returns:
- the value of the
summaryrecord component
-
summaryText
Returns the value of thesummaryTextrecord component.- Returns:
- the value of the
summaryTextrecord component
-