org.apache.fop.fo.flow
Class RowSpanMgr

java.lang.Object
  extended by org.apache.fop.fo.flow.RowSpanMgr

public class RowSpanMgr
extends Object


Constructor Summary
RowSpanMgr(int numCols)
           
 
Method Summary
 void addRowSpan(TableCell cell, int firstCol, int numCols, int cellHeight, int rowsSpanned)
           
 void finishRow(int rowHeight)
          Done with a row.
 int getRemainingHeight(int colNum)
          If the cell in this column is in the last row of its vertical span, return the height left.
 TableCell getSpanningCell(int colNum)
           
 boolean hasUnfinishedSpans()
          Return true if any column has an unfinished vertical span.
 boolean ignoreKeeps()
          helper method (i.e.
 boolean isInLastRow(int colNum)
           
 boolean isSpanned(int colNum)
           
 void setIgnoreKeeps(boolean ignoreKeeps)
          helper method to prevent infinite loops if keeps or spans are not fitting on a page
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RowSpanMgr

public RowSpanMgr(int numCols)
Method Detail

addRowSpan

public void addRowSpan(TableCell cell,
                       int firstCol,
                       int numCols,
                       int cellHeight,
                       int rowsSpanned)

isSpanned

public boolean isSpanned(int colNum)

getSpanningCell

public TableCell getSpanningCell(int colNum)

hasUnfinishedSpans

public boolean hasUnfinishedSpans()
Return true if any column has an unfinished vertical span.


finishRow

public void finishRow(int rowHeight)
Done with a row. Any spans with only one row left are done This means that we can now set the total height for this cell box Loop over all cells with spans and find number of rows remaining if rows remaining = 1, set the height on the cell area and then remove the cell from the list of spanned cells. For other spans, add the rowHeight to the spanHeight.


getRemainingHeight

public int getRemainingHeight(int colNum)
If the cell in this column is in the last row of its vertical span, return the height left. If it's not in the last row, or if the content height <= the content height of the previous rows of the span, return 0.


isInLastRow

public boolean isInLastRow(int colNum)

setIgnoreKeeps

public void setIgnoreKeeps(boolean ignoreKeeps)
helper method to prevent infinite loops if keeps or spans are not fitting on a page

Parameters:
true - if keeps and spans should be ignored

ignoreKeeps

public boolean ignoreKeeps()
helper method (i.e. hack ;-) to prevent infinite loops if keeps or spans are not fitting on a page

Returns:
true if keeps or spans should be ignored


Copyright ? 1999-2003 Apache Software Foundation. All Rights Reserved.