Record Class PageMargins

java.lang.Object
java.lang.Record
io.keikai.axyra.sheets.PageMargins
Record Components:
left - the left margin in inches
right - the right margin in inches
top - the top margin in inches
bottom - the bottom margin in inches
header - the distance from the page top to the header, in inches
footer - the distance from the page bottom to the footer, in inches

public record PageMargins(double left, double right, double top, double bottom, double header, double footer) extends Record
The six page margins of a sheet, in inches (Excel semantics; ECMA-376 Part 1 §18.3.1.62 pageMargins). Excel's "Normal" preset is left/right = 0.7, top/bottom = 0.75, header/footer = 0.3.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PageMargins(double left, double right, double top, double bottom, double header, double footer)
    Creates an instance of a PageMargins record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    Returns the value of the bottom record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the footer record component.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the header record component.
    double
    Returns the value of the left record component.
    double
    Returns the value of the right record component.
    double
    top()
    Returns the value of the top record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

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

    • PageMargins

      public PageMargins(double left, double right, double top, double bottom, double header, double footer)
      Creates an instance of a PageMargins record class.
      Parameters:
      left - the value for the left record component
      right - the value for the right record component
      top - the value for the top record component
      bottom - the value for the bottom record component
      header - the value for the header record component
      footer - the value for the footer 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 '=='.
      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.
    • left

      public double left()
      Returns the value of the left record component.
      Returns:
      the value of the left record component
    • right

      public double right()
      Returns the value of the right record component.
      Returns:
      the value of the right record component
    • top

      public double top()
      Returns the value of the top record component.
      Returns:
      the value of the top record component
    • bottom

      public double bottom()
      Returns the value of the bottom record component.
      Returns:
      the value of the bottom record component
    • header

      public double header()
      Returns the value of the header record component.
      Returns:
      the value of the header record component
    • footer

      public double footer()
      Returns the value of the footer record component.
      Returns:
      the value of the footer record component