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
    Modifier and Type
    Field
    Description
    static final GuideBook.Layout
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Layout(int tabX, int tabY, int tabSpacing, int buttonX, int buttonY, int numberX, int numberY, int closeX, int closeY)
    Creates an instance of a Layout record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the buttonX record component.
    int
    Returns the value of the buttonY record component.
    int
    Returns the value of the closeX record component.
    int
    Returns the value of the closeY record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Returns the value of the numberX record component.
    int
    Returns the value of the numberY record component.
    int
    Returns the value of the tabSpacing record component.
    int
    Returns the value of the tabX record component.
    int
    Returns the value of the tabY record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class Object

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

  • 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 a Layout record class.
      Parameters:
      tabX - the value for the tabX record component
      tabY - the value for the tabY record component
      tabSpacing - the value for the tabSpacing record component
      buttonX - the value for the buttonX record component
      buttonY - the value for the buttonY record component
      numberX - the value for the numberX record component
      numberY - the value for the numberY record component
      closeX - the value for the closeX record component
      closeY - the value for the closeY 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.
    • tabX

      public int tabX()
      Returns the value of the tabX record component.
      Returns:
      the value of the tabX record component
    • tabY

      public int tabY()
      Returns the value of the tabY record component.
      Returns:
      the value of the tabY record component
    • tabSpacing

      public int tabSpacing()
      Returns the value of the tabSpacing record component.
      Returns:
      the value of the tabSpacing record component
    • buttonX

      public int buttonX()
      Returns the value of the buttonX record component.
      Returns:
      the value of the buttonX record component
    • buttonY

      public int buttonY()
      Returns the value of the buttonY record component.
      Returns:
      the value of the buttonY record component
    • numberX

      public int numberX()
      Returns the value of the numberX record component.
      Returns:
      the value of the numberX record component
    • numberY

      public int numberY()
      Returns the value of the numberY record component.
      Returns:
      the value of the numberY record component
    • closeX

      public int closeX()
      Returns the value of the closeX record component.
      Returns:
      the value of the closeX record component
    • closeY

      public int closeY()
      Returns the value of the closeY record component.
      Returns:
      the value of the closeY record component