Record Class PageSummary

java.lang.Object
java.lang.Record
io.leandev.appfuse.report.PageSummary
Record Components:
everyPage - 非最後頁內容
lastPage - 最後頁內容
style - 文字與行高覆寫;段距及縮排不適用
gap - 內容與摘要之間的距離
paddingTop - 摘要上內距
paddingBottom - 摘要下內距
reserveHeight - 每頁最小預留高度,實際取此值與文件/分節摘要所需高度的最大值
rule - 摘要上線;null 或零線寬表示不畫,不增加高度
paddingLeft - 摘要左內距;左側內容自內容區左緣加此距離起排
paddingRight - 摘要右內距;右側內容右緣止於內容區右緣減此距離

public record PageSummary(PageRegion everyPage, PageRegion lastPage, ParagraphStyle style, Length gap, Length paddingTop, Length paddingBottom, Length reserveHeight, LineStyle rule, Length paddingLeft, Length paddingRight) extends Record
每頁內容末端的左右摘要;可以使用頁碼及總頁數,不改變固定 PageRegion 頁尾。 位於頂層 pageBreakBefore=true Section 的頁面另可使用 SectionPageNumber/SectionPageCount, 解析為該分節的頁碼與排版完成後的實際總頁數。 左右內容不自動換行,超寬時失敗而非截斷;同字級單行內容使用相同基線。 左右內距只縮排文字,摘要上線仍畫滿內容區寬度。 最後頁採 lastPage,其他頁採 everyPage;分節最後頁可逐側優先採 PageSummaryOverride。 無摘要文字時仍保留設定的線及空間。
Since:
4.0.0
  • Constructor Details

  • 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 Objects::equals(Object,Object).
      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.
    • everyPage

      public PageRegion everyPage()
      Returns the value of the everyPage record component.
      Returns:
      the value of the everyPage record component
    • lastPage

      public PageRegion lastPage()
      Returns the value of the lastPage record component.
      Returns:
      the value of the lastPage record component
    • style

      public ParagraphStyle style()
      Returns the value of the style record component.
      Returns:
      the value of the style record component
    • gap

      public Length gap()
      Returns the value of the gap record component.
      Returns:
      the value of the gap record component
    • paddingTop

      public Length paddingTop()
      Returns the value of the paddingTop record component.
      Returns:
      the value of the paddingTop record component
    • paddingBottom

      public Length paddingBottom()
      Returns the value of the paddingBottom record component.
      Returns:
      the value of the paddingBottom record component
    • reserveHeight

      public Length reserveHeight()
      Returns the value of the reserveHeight record component.
      Returns:
      the value of the reserveHeight record component
    • rule

      public LineStyle rule()
      Returns the value of the rule record component.
      Returns:
      the value of the rule record component
    • paddingLeft

      public Length paddingLeft()
      Returns the value of the paddingLeft record component.
      Returns:
      the value of the paddingLeft record component
    • paddingRight

      public Length paddingRight()
      Returns the value of the paddingRight record component.
      Returns:
      the value of the paddingRight record component