org.pentaho.reporting.engine.classic.core.layout.model
Class PageBreakPositionList

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.layout.model.PageBreakPositionList

public final class PageBreakPositionList
extends Object

Creation-Date: 15.04.2007, 13:34:13

Author:
Thomas Morgner

Constructor Summary
PageBreakPositionList()
           
PageBreakPositionList(PageBreakPositionList parentList)
           
 
Method Summary
 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)
           
 long findNextBreakPosition(long position)
          Returns the last break position that is smaller or equal
 long findNextMajorBreakPosition(long pos)
           
 long getLastMasterBreak()
           
 boolean isCrossingPagebreak(RenderBox box, long shift)
           
 boolean isCrossingPagebreakWithFixedPosition(long shiftedBoxPosition, long boxHeight, long fixedPositionResolved)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PageBreakPositionList

public PageBreakPositionList()

PageBreakPositionList

public PageBreakPositionList(PageBreakPositionList parentList)
Method Detail

copyFrom

public void copyFrom(PageBreakPositionList parentList)

addMinorBreak

public void addMinorBreak(long position)

addMajorBreak

public void addMajorBreak(long position,
                          long pageHeaderSize)

findNextBreakPosition

public long findNextBreakPosition(long position)
Returns the last break position that is smaller or equal

Parameters:
position -
Returns:

isCrossingPagebreak

public boolean isCrossingPagebreak(RenderBox box,
                                   long shift)

isCrossingPagebreakWithFixedPosition

public boolean isCrossingPagebreakWithFixedPosition(long shiftedBoxPosition,
                                                    long boxHeight,
                                                    long fixedPositionResolved)

computeFixedPositionInFlow

public long computeFixedPositionInFlow(long shiftedBoxPosition,
                                       long fixedPositionResolved)
Computes the box's position in the normal-flow that will fullfill the 'fixed-position' constraint. The result will be the position on the current page. This position might sit on already processed content, so the caller has to check whether the return value of this function is less than the shifted box position. In that case, the band must cause a pagebreak before it can be positioned.

Parameters:
shiftedBoxPosition -
fixedPositionResolved -
Returns:
the computed fixed position, which may be invalid.

findNextMajorBreakPosition

public long findNextMajorBreakPosition(long pos)

getLastMasterBreak

public long getLastMasterBreak()

toString

public String toString()
Overrides:
toString in class Object