Class Sections

java.lang.Object
com.teamten.typeset.Sections

public class Sections extends Object
Keeps track of the positions of the sections (parts, chapters) of the book.
  • Constructor Details

    • Sections

      public Sections()
  • Method Details

    • configureFromBookmarks

      public void configureFromBookmarks(Bookmarks bookmarks)
      Look through the bookmarks to figure out where the body starts and, for any given page, what part and chapter it's in.
    • getSectionBookmark

      public SectionBookmark getSectionBookmark(int physicalPageNumber)
      Gets the section bookmark for the physical page number, or null if that page doesn't start a section.
    • sections

      Returns an ordered sequence of the sections in this document. The integer key is the physical page number.
    • hasParts

      public boolean hasParts()
      Whether we have any parts.
    • shouldDrawHeadline

      public boolean shouldDrawHeadline(int physicalPageNumber)
      Whether we should draw a headline on this page.
    • getPageNumberLabel

      public String getPageNumberLabel(int physicalPageNumber)
      Returns the displayed page number label for the physical page number. The displayed page number might be in roman or arabic numerals.
    • getHeadlineLabel

      public String getHeadlineLabel(int physicalPageNumber, Config config)
      Return the string to display at the top center of the page. This is usually based on the current part or chapter title.