Package com.openhtmltopdf.layout
Class FootnoteManager
- java.lang.Object
-
- com.openhtmltopdf.layout.FootnoteManager
-
public class FootnoteManager extends java.lang.ObjectThe 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 classFootnoteManager.FootnoteArea
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<BlockBox,FootnoteManager.FootnoteArea>_containerMapprivate 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 voidaddFootnoteBody(LayoutContext c, BlockBox footnoteBody, LineBox line)Adds a footnote body to the line box page, creating the footnote area as required.private voidclearFootnoteAreaPages(FootnoteManager.FootnoteArea area)private FootnoteManager.FootnoteAreacreateFootnoteArea(LayoutContext c, PageBox page)private BlockBoxcreateFootnoteAreaBlock(LayoutContext c, PageBox footnoteCallPage)Sets up the footnote area.private voidpositionFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, PageBox firstPage, int lineHeight, boolean allowRepeat)voidremoveFootnoteBodies(LayoutContext c, java.util.List<BlockBox> footnoteBodies, LineBox line)Removes footnotes.private voidreserveSubsequentPagesForFootnoteArea(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.
-
-