org.pentaho.reporting.engine.classic.core.states.datarow
Class PaddingDataRow

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.states.datarow.PaddingDataRow

public class PaddingDataRow
extends Object

A datarow that acts as padding source. It overrides the columns from either report-data or expressions datarow with values collected by the crosstab-specification. It also provides padding for the advance calls.

There are three padding scenarios that must be covered by this data-row:

The last two cases may be consolidated into one case.

Author:
Thomas Morgner

Constructor Summary
PaddingDataRow(CrosstabSpecification crosstabSpecification)
           
PaddingDataRow(PaddingDataRow dataRow)
           
 
Method Summary
 void activate(MasterDataRow dataRow)
           
 PaddingDataRow advance()
           
 int getCrosstabColumnCount()
           
 int getCurrentCursorPosition()
           
 int getPostPaddingRows(DataRow globalView)
          After an advance, do we have to delay the advance and insert some extra rows? If we delay, then the advance has to be undone and we have to get marked for either case2 or case3.
 int getPrePaddingRows(DataRow globalView)
          Do we need a case1 padding?
 PaddingDataRow resetRowCursor()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaddingDataRow

public PaddingDataRow(PaddingDataRow dataRow)

PaddingDataRow

public PaddingDataRow(CrosstabSpecification crosstabSpecification)
Method Detail

getPrePaddingRows

public int getPrePaddingRows(DataRow globalView)
Do we need a case1 padding?

Parameters:
globalView -
Returns:
the number of rows needed for the pre-padding or zero if no pre-padding is required.

getCurrentCursorPosition

public int getCurrentCursorPosition()

getCrosstabColumnCount

public int getCrosstabColumnCount()

getPostPaddingRows

public int getPostPaddingRows(DataRow globalView)
After an advance, do we have to delay the advance and insert some extra rows? If we delay, then the advance has to be undone and we have to get marked for either case2 or case3.

Parameters:
globalView -
Returns:
the number of rows we have to insert for post-padding. If no padding is needed, zero is returned.

advance

public PaddingDataRow advance()

activate

public void activate(MasterDataRow dataRow)

resetRowCursor

public PaddingDataRow resetRowCursor()