Package com.teamten.typeset
Class Sections
java.lang.Object
com.teamten.typeset.Sections
Keeps track of the positions of the sections (parts, chapters) of the book.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.getHeadlineLabel
(int physicalPageNumber, Config config) Return the string to display at the top center of the page.getPageNumberLabel
(int physicalPageNumber) Returns the displayed page number label for the physical page number.getSectionBookmark
(int physicalPageNumber) Gets the section bookmark for the physical page number, or null if that page doesn't start a section.boolean
hasParts()
Whether we have any parts.sections()
Returns an ordered sequence of the sections in this document.boolean
shouldDrawHeadline
(int physicalPageNumber) Whether we should draw a headline on this page.
-
Constructor Details
-
Sections
public Sections()
-
-
Method Details
-
configureFromBookmarks
Look through the bookmarks to figure out where the body starts and, for any given page, what part and chapter it's in. -
getSectionBookmark
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
Returns the displayed page number label for the physical page number. The displayed page number might be in roman or arabic numerals. -
getHeadlineLabel
Return the string to display at the top center of the page. This is usually based on the current part or chapter title.
-