Top Inners Fields Constructors Methods
com.openhtmltopdf.render.displaylist

public Class PagedBoxCollector

extends Object
Class Inheritance
Imports
java.awt.Rectangle, .Shape, java.awt.geom.AffineTransform, .Area, .Point2D, java.util.ArrayList, .Collections, .List, com.openhtmltopdf.css.constants.IdentValue, com.openhtmltopdf.css.style.CssContext, com.openhtmltopdf.layout.Layer, .PaintingInfo, com.openhtmltopdf.newtable.TableBox, .TableCellBox, .TableSectionBox, com.openhtmltopdf.render.BlockBox, .Box, .OperatorClip, .DisplayListItem, .InlineLayoutBox, .LineBox, .PageBox, .RenderingContext, .OperatorSetClip

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
private static class
private static class
private static interface
PagedBoxCollector.AddToShadowPage

The joys of lambda style programming in Java 6!

private static class
public static class
public static class
public static class

Field Summary

Modifier and TypeField and Description
private final PagedBoxCollector.PageFinder
public static final int
PAGE_ALL

Add collected boxes to all pages, including inserted shadow pages.

public static final int
PAGE_BASE_ONLY

Add collected items to base page only, ignoring inserted shadow pages.

private final List<PageBox>
private final List<PagedBoxCollector.PageResult>
private final int

Constructor Summary

AccessConstructor and Description
public
PagedBoxCollector(List<PageBox> pages, int minPage, int maxPage)

A more efficient paged box collector that can only find boxes on pages minPage to maxPage inclusive.

Method Summary

Modifier and TypeMethod and Description
private void
addBlock(Box container, PagedBoxCollector.PageResult pageResult)

Adds block box to appropriate flat box lists.

private void
addBlockToAll(CssContext c, Layer layer, Box container, int pgStart, int pgEnd, Shape ourClip, List<PagedBoxCollector.PageResult> clipPages, boolean includeShadowPages)

private void
addBlockToShadowPage(CssContext c, Layer layer, Box container, int pgStart, int pgEnd, Shape ourClip, List<PagedBoxCollector.PageResult> clipPages, int shadowPageNumber)

private void
addBoxToShadowPages(CssContext c, Box container, int pageNumber, PagedBoxCollector.PageResult pageResult, Shape ourClip, List<PagedBoxCollector.PageResult> clipPages, Layer layer, PagedBoxCollector.AddToShadowPage addToMethod)

Adds box to inserted shadow pages as needed.

private void
addLineBoxToAll(CssContext c, Layer layer, LineBox container, int basePageNumber, boolean includeShadowPages)

Adds a line box to the base page if needed and any shadow pages as needed.

private void
addLineBoxToShadowPage(CssContext c, Layer layer, LineBox container, int basePageNumber, int shadowPageNumber)

private void
addTableHeaderFooter(CssContext c, Layer layer, Box container, int shadowPageNumber)

private static Rectangle
applyOverflowClip(Rectangle bounds, Area overflowClip)

private boolean
boxIntersects(CssContext c, Shape clip, Box box, Rectangle boxBounds)

public void
public void
collect(CssContext c, Layer layer, Box container, int shadowPageNumber)

The main box collection method.

public void
collect(CssContext c, Layer layer, Box container, int pgStart, int pgEnd, int shadowPageNumber)

public void
private void
public static Rectangle
findAdjustedBoundsForBorderBox(CssContext c, Box container, List<PageBox> pages)

Finds the document coordinates border box bounds of a box adjusted for transform and clipped according to overflow hidden.

public static Rectangle
findAdjustedBoundsForContentBox(CssContext c, Box container)

Finds the document coordinates content box bounds of a box adjusted for transform and clipped according to overflow hidden.

protected int
protected int
findEndPage(CssContext c, Box container, AffineTransform transform)

public static int

Returns:

0 based page number of end of container paint area (including overflow)
findEndPage
(CssContext c, Box container, List<PageBox> pages)

public static List<PagedBoxCollector.PageInfo>
findLayerPages(CssContext c, Layer layer, List<PageBox> pages)

Returns the pages a layer appears on including inserted overflow pages.

public static Rectangle
public static int
findPageForY(CssContext c, double y, List<PageBox> pages)

protected int
protected int
findStartPage(CssContext c, Box container, AffineTransform transform)

public static int

Returns:

0 based page number of start of container paint area (including overflow)
findStartPage
(CssContext c, Box container, List<PageBox> pages)

private static Rectangle
getBoxRect(CssContext c, Box container)

private static PagedBoxCollector.FourPoint
protected int
private static double
private static double
getMaxXFromTransformedBox(Rectangle bounds, AffineTransform transform)

There is a matrix in effect.

private static double
private static double
getMaxYFromTransformedBox(Rectangle bounds, AffineTransform transform)

There is a matrix in effect, we have to apply it to the box bounds before checking what page(s) it sits on.

protected int
private static double
private static double
private static double
getMinYFromTransformedBox(Rectangle bounds, AffineTransform transform)

There is a matrix in effect, we have to apply it to the box bounds before checking what page(s) it sits on.

private PagedBoxCollector.PageResult
getOrCreateShadowPage(PagedBoxCollector.PageResult basePage, int shadowPageNumber)

Inserts shadow pages as needed.

protected PageBox
getPageBox(int pageNo)

protected PagedBoxCollector.PageResult
getPageResult(int pageNo)

public static int
protected int
protected int
private boolean
private boolean
intersectsAny(CssContext c, Shape clip, Box master, Box container)

private boolean
intersectsBorderBoxBounds(CssContext c, Shape clip, Box box)

Returns whether a box (out to the outside edge of border) is partially or fully in a clip shape.

private static void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait