Package net.ixdarklord.folios.api.client
Record Class GuideBook.Layout
java.lang.Object
java.lang.Record
net.ixdarklord.folios.api.client.GuideBook.Layout
- Enclosing class:
GuideBook
public static record GuideBook.Layout(int tabX, int tabY, int tabSpacing, int buttonX, int buttonY, int numberX, int numberY, int closeX, int closeY)
extends Record
Where the things around a page's content sit, in page pixels, in both styles:
"layout" in book.json.
"layout": {
"tabs": {"x": 0, "y": 6, "spacing": 2}, // out from the book's edge; down from the pages' top; between tabs
"turn_buttons": {"x": 10, "y": 21}, // in from the page's outer edge; up from its bottom
"page_numbers": {"x": 0, "y": 19}, // across from the page's middle; up from its bottom
"close_button": {"x": 14, "y": 11} // a page close clasp, where one is drawn (both styles close from their bar)
}
Any value left out keeps its default.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLayout(int tabX, int tabY, int tabSpacing, int buttonX, int buttonY, int numberX, int numberY, int closeX, int closeY) Creates an instance of aLayoutrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbuttonX()Returns the value of thebuttonXrecord component.intbuttonY()Returns the value of thebuttonYrecord component.intcloseX()Returns the value of thecloseXrecord component.intcloseY()Returns the value of thecloseYrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.intnumberX()Returns the value of thenumberXrecord component.intnumberY()Returns the value of thenumberYrecord component.intReturns the value of thetabSpacingrecord component.inttabX()Returns the value of thetabXrecord component.inttabY()Returns the value of thetabYrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
-
-
Constructor Details
-
Layout
public Layout(int tabX, int tabY, int tabSpacing, int buttonX, int buttonY, int numberX, int numberY, int closeX, int closeY) Creates an instance of aLayoutrecord class.- Parameters:
tabX- the value for thetabXrecord componenttabY- the value for thetabYrecord componenttabSpacing- the value for thetabSpacingrecord componentbuttonX- the value for thebuttonXrecord componentbuttonY- the value for thebuttonYrecord componentnumberX- the value for thenumberXrecord componentnumberY- the value for thenumberYrecord componentcloseX- the value for thecloseXrecord componentcloseY- the value for thecloseYrecord component
-
-
Method Details
-
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 with '=='. -
tabX
public int tabX()Returns the value of thetabXrecord component.- Returns:
- the value of the
tabXrecord component
-
tabY
public int tabY()Returns the value of thetabYrecord component.- Returns:
- the value of the
tabYrecord component
-
tabSpacing
public int tabSpacing()Returns the value of thetabSpacingrecord component.- Returns:
- the value of the
tabSpacingrecord component
-
buttonX
public int buttonX()Returns the value of thebuttonXrecord component.- Returns:
- the value of the
buttonXrecord component
-
buttonY
public int buttonY()Returns the value of thebuttonYrecord component.- Returns:
- the value of the
buttonYrecord component
-
numberX
public int numberX()Returns the value of thenumberXrecord component.- Returns:
- the value of the
numberXrecord component
-
numberY
public int numberY()Returns the value of thenumberYrecord component.- Returns:
- the value of the
numberYrecord component
-
closeX
public int closeX()Returns the value of thecloseXrecord component.- Returns:
- the value of the
closeXrecord component
-
closeY
public int closeY()Returns the value of thecloseYrecord component.- Returns:
- the value of the
closeYrecord component
-