++rowIdx;
}
private boolean prepareContinuingRowHeader(int rowGroup, int availableHeight) throws JRException
{
HeaderCell cell = spanHeaders[rowGroup];
int vSpan = rowIdx + startRowIndex - spanHeadersStart[rowGroup];
if (spanHeadersStart[rowGroup] < startRowIndex)//continuing from the prev page
{
vSpan += spanHeadersStart[rowGroup] - startRowIndex;
}
int headerY = ((Integer) rowYs.get(rowIdx - vSpan)).intValue();
int lastHeaderY = ((Integer) rowYs.get(rowIdx)).intValue();
int headerHeight = lastHeaderY - headerY;
int nextToLastHeaderY = ((Integer) rowYs.get(rowIdx - 1)).intValue();
int stretchHeight = nextToLastHeaderY - headerY;
JRFillCrosstabRowGroup group = rowGroups[rowGroup];
JRFillCellContents contents = cell.isTotal() ? group.getFillTotalHeader() : group.getFillHeader();
boolean stretchContents = group.getPositionValue() == CrosstabRowPositionEnum.STRETCH;
int contentsHeight = stretchContents ? headerHeight : contents.getHeight();
boolean headerOverflow = availableHeight < headerY + contentsHeight || headerHeight < contents.getHeight();
if (!headerOverflow)
{
setCountVars(rowIdx + startRowIndex - vSpan, -1);
setGroupVariables(rowGroups, cell.getBucketValues());
if (stretchContents)
{
contents = contents.getTransformedContents(contents.getWidth(), headerHeight, CrosstabColumnPositionEnum.LEFT, CrosstabRowPositionEnum.STRETCH);
}
contents = contents.getBoxContents(false, false, rowIdx == vSpan && (!printColumnHeaders || headerCell == null));
contents.getWorkingClone();
contents.evaluate(JRExpression.EVALUATION_DEFAULT);
contents.prepare(availableHeight - headerY);
preparedRow.add(contents);
headerOverflow = contents.willOverflow();
if (!headerOverflow)
{
contents.setX(rowHeadersXOffsets[rowGroup]);
contents.setY(headerY + yOffset);
contents.setVerticalSpan(vSpan);
contents.setHorizontalSpan(cell.getDepthSpan());
int rowHeight = contents.getPrintHeight() - stretchHeight;
if (rowHeight > preparedRowHeight)
{
preparedRowHeight = rowHeight;