Top Description Inners Fields Constructors Methods
com.openhtmltopdf.layout

public Class FootnoteManager

extends Object
Class Inheritance
Imports
java.awt.Rectangle, java.util.Collections, .HashMap, .List, .Map, org.w3c.dom.Element, com.openhtmltopdf.css.style.CalculatedStyle, .EmptyStyle, com.openhtmltopdf.render.BlockBox, .Box, .LineBox, .PageBox, .ViewportBox, com.openhtmltopdf.util.BoxUtil, .OpenUtil

The footnote manager which is only created if footnotes are detected in the document. See LayoutContext#getFootnoteManager()

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class

Field Summary

Modifier and TypeField and Description
private final Map<BlockBox, FootnoteManager.FootnoteArea>
private final Map<PageBox, FootnoteManager.FootnoteArea>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public 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
private FootnoteManager.FootnoteArea
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)

public void
removeFootnoteBodies(LayoutContext c, List<BlockBox> footnoteBodies, LineBox line)

Removes footnotes.

private void
reserveSubsequentPagesForFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, int desiredHeight, int footnoteTop, int startAt)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

_containerMapback to summary
private final Map<BlockBox, FootnoteManager.FootnoteArea> _containerMap
_footnoteAreasback to summary
private final Map<PageBox, FootnoteManager.FootnoteArea> _footnoteAreas

Constructor Detail

FootnoteManagerback to summary
public FootnoteManager()

Method Detail

addFootnoteBodyback to summary
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 Note

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 call removeFootnoteBodies(LayoutContext, List, LineBox) before the page change and this method again after.

clearFootnoteAreaPagesback to summary
private void clearFootnoteAreaPages(FootnoteManager.FootnoteArea area)
createFootnoteAreaback to summary
private FootnoteManager.FootnoteArea createFootnoteArea(LayoutContext c, PageBox page)
createFootnoteAreaBlockback to summary
private BlockBox createFootnoteAreaBlock(LayoutContext c, PageBox footnoteCallPage)

Sets up the footnote area.

positionFootnoteAreaback to summary
private void positionFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, PageBox firstPage, int lineHeight, boolean allowRepeat)
removeFootnoteBodiesback to summary
public void removeFootnoteBodies(LayoutContext c, 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.

reserveSubsequentPagesForFootnoteAreaback to summary
private void reserveSubsequentPagesForFootnoteArea(LayoutContext c, FootnoteManager.FootnoteArea area, int desiredHeight, int footnoteTop, int startAt)
com.openhtmltopdf.layout back to summary

private Class FootnoteManager.FootnoteArea

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv BlockBox
public float
pack-priv List<PageBox>

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

footnoteAreaback to summary
pack-priv BlockBox footnoteArea
maxHeightback to summary
public float maxHeight
pagesback to summary
pack-priv List<PageBox> pages

Constructor Detail

FootnoteAreaback to summary
private FootnoteArea()