Package com.openhtmltopdf.layout
Class FootnoteManager
- java.lang.Object
-
- com.openhtmltopdf.layout.FootnoteManager
-
public class FootnoteManager extends java.lang.Object
The footnote manager which is only created if footnotes are detected in the document. SeeLayoutContext.getFootnoteManager()
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
FootnoteManager.FootnoteArea
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<BlockBox,FootnoteManager.FootnoteArea>
_containerMap
private java.util.Map<PageBox,FootnoteManager.FootnoteArea>
_footnoteAreas
-
Constructor Summary
Constructors Constructor Description FootnoteManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addFootnoteBody(LayoutContext c, BlockBox footnoteBody, LineBox line)
Adds a footnote body to the line box page, creating the footnote area as required.private void
clearFootnoteAreaPages(FootnoteManager.FootnoteArea area)
private FootnoteManager.FootnoteArea
createFootnoteArea(LayoutContext c, PageBox page)
private BlockBox
createFootnoteAreaBlock(LayoutContext c, PageBox footnoteCallPage)
Sets up the footnote area.private void
positionFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, PageBox firstPage, int lineHeight, boolean allowRepeat)
void
removeFootnoteBodies(LayoutContext c, java.util.List<BlockBox> footnoteBodies, LineBox line)
Removes footnotes.private void
reserveSubsequentPagesForFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, int desiredHeight, int footnoteTop, int startAt)
-
-
-
Field Detail
-
_footnoteAreas
private final java.util.Map<PageBox,FootnoteManager.FootnoteArea> _footnoteAreas
-
_containerMap
private final java.util.Map<BlockBox,FootnoteManager.FootnoteArea> _containerMap
-
-
Method Detail
-
createFootnoteArea
private FootnoteManager.FootnoteArea createFootnoteArea(LayoutContext c, PageBox page)
-
createFootnoteAreaBlock
private BlockBox createFootnoteAreaBlock(LayoutContext c, PageBox footnoteCallPage)
Sets up the footnote area.
-
positionFootnoteArea
private void positionFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, PageBox firstPage, int lineHeight, boolean allowRepeat)
-
reserveSubsequentPagesForFootnoteArea
private void reserveSubsequentPagesForFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, int desiredHeight, int footnoteTop, int startAt)
-
clearFootnoteAreaPages
private void clearFootnoteAreaPages(FootnoteManager.FootnoteArea area)
-
addFootnoteBody
public void addFootnoteBody(LayoutContext c, BlockBox footnoteBody, LineBox line)
Adds a footnote body to the line box page, creating the footnote area as required.
Important: This changes the page break point by expanding the footnote area. It also reserves subsequent pages if required for the footnote area.
If the line box is moved to a different page, one must callremoveFootnoteBodies(LayoutContext, List, LineBox)
before the page change and this method again after.
-
removeFootnoteBodies
public void removeFootnoteBodies(LayoutContext c, java.util.List<BlockBox> footnoteBodies, LineBox line)
Removes footnotes. This is used when a line is moved to a new page. We remove from first page and add to the next.
-
-