public class PageBreakPositionList extends Object implements PageBreakPositions
Constructor and Description |
---|
PageBreakPositionList() |
PageBreakPositionList(PageBreakPositionList parentList) |
Modifier and Type | Method and Description |
---|---|
void |
addMajorBreak(long position,
long pageHeaderSize) |
void |
addMinorBreak(long position) |
long |
computeFixedPositionInFlow(long shiftedBoxPosition,
long fixedPositionResolved)
Computes the box's position in the normal-flow that will fullfill the 'fixed-position' constraint.
|
void |
copyFrom(PageBreakPositionList parentList) |
boolean |
equals(Object o) |
long |
findNextBreakPosition(long position)
Finds the closest break-position that is larger or equal to the given position.
|
long |
findNextMajorBreakPosition(long position)
Finds the closest master break-position that is larger or equal to the given position.
|
long |
findPageEndForPageStartPosition(long pageOffset)
Locates the page-end for a given page-start position.
|
long |
findPageStartPositionForPageEndPosition(long pageOffset)
Locates the page-start for a given page-end position.
|
long |
findPreviousBreakPosition(long position) |
long |
getLastMasterBreak() |
long |
getMasterBreak(int index) |
int |
getMasterBreakSize() |
int |
hashCode() |
boolean |
isCrossingPagebreak(long boxY,
long boxHeight,
long pagebreakShift)
Checks, whether the given box will cross a pagebreak.
|
boolean |
isCrossingPagebreakWithFixedPosition(long shiftedBoxPosition,
long boxHeight,
long fixedPositionResolved) |
boolean |
isPageStart(long position) |
String |
toString() |
public PageBreakPositionList()
public PageBreakPositionList(PageBreakPositionList parentList)
public void copyFrom(PageBreakPositionList parentList)
public void addMinorBreak(long position)
public void addMajorBreak(long position, long pageHeaderSize)
public long findNextBreakPosition(long position)
findNextBreakPosition
in interface PageBreakPositions
position
- the position from where to search the next pagebreak.public long findPreviousBreakPosition(long position)
findPreviousBreakPosition
in interface PageBreakPositions
public boolean isCrossingPagebreak(long boxY, long boxHeight, long pagebreakShift)
isCrossingPagebreak
in interface PageBreakPositions
boxY
- the box Y, unshifted.boxHeight
- the box height.pagebreakShift
- the current shift that should be applied for the testpublic boolean isCrossingPagebreakWithFixedPosition(long shiftedBoxPosition, long boxHeight, long fixedPositionResolved)
isCrossingPagebreakWithFixedPosition
in interface PageBreakPositions
public long computeFixedPositionInFlow(long shiftedBoxPosition, long fixedPositionResolved)
computeFixedPositionInFlow
in interface PageBreakPositions
shiftedBoxPosition
- fixedPositionResolved
- public long findNextMajorBreakPosition(long position)
findNextMajorBreakPosition
in interface PageBreakPositions
position
- the position from where to search the next pagebreak.public long getLastMasterBreak()
public int getMasterBreakSize()
public long getMasterBreak(int index)
public long findPageEndForPageStartPosition(long pageOffset)
PageBreakPositions
findPageEndForPageStartPosition
in interface PageBreakPositions
pageOffset
- the current page-start for which to find the page-end.pageStartPosition
.public long findPageStartPositionForPageEndPosition(long pageOffset)
PageBreakPositions
findPageStartPositionForPageEndPosition
in interface PageBreakPositions
pageOffset
- the current page-end for which to find the page-start.pageEndPosition
.public boolean isPageStart(long position)
isPageStart
in interface PageBreakPositions