This class represents a primary grid unit of a spanned cell. This is the "before-start"
(top-left, usually) grid unit of the span.
addRow
public void addRow(GridUnit[] row)
createCellLM
public void createCellLM()
Creates a cellLM for the corresponding table-cell. A new one must be created
for each new static-content (TODO).
getAfterBorderWidth
public int getAfterBorderWidth(int which)
getAfterBorderWidth
public int getAfterBorderWidth(int rowIndex,
int which)
Returns the width of the before-after for the given row-span of this cell. In the
separate border model half of the border-separation is included. In the collapsing
model only half of the border is counted, since the other half belongs to the
following cell; also, the returned value is the maximum of the segments of each
applicable grid unit.
getBeforeAfterBorderWidth
public int getBeforeAfterBorderWidth()
Returns the widths of the border-before and -after for this cell. In the separate
border model the border-separation is included. In the collapsing model only half
of them is counted, since the other halves belong to the neighbouring cells; also,
the returned value is the maximum of the segments of each applicable grid unit.
- the sum of the before and after border widths
getBeforeBorderWidth
public int getBeforeBorderWidth(int rowIndex,
int which)
Returns the width of the before-border for the given row-span of this cell. In the
separate border model half of the border-separation is included. In the collapsing
model only half of the border is counted, since the other half belongs to the
preceding cell; also, the returned value is the maximum of the segments of each
applicable grid unit.
getBreakAfter
public int getBreakAfter()
Returns the class of the before after for the last child element of this cell.
getBreakBefore
public int getBreakBefore()
Returns the class of the before break for the first child element of this cell.
getColIndex
public int getColIndex()
Returns the index of the column this grid unit belongs to.
- the column index, 0-based
getContentLength
public int getContentLength()
- the length of the cell content.
getElements
public LinkedList getElements()
getRowIndex
public int getRowIndex()
Returns the index of the row this grid unit belongs to. This is the index, in the
enclosing table part, of the first row spanned by the cell. Note that if the table
has several table-body children, then the index grows continuously across them;
they are considered to form one single part, the "body of the table".
- the index of the row this grid unit belongs to, 0-based.
getRows
public List getRows()
Returns the grid units belonging to the same span as this one.
- a list of GridUnit[], each array corresponds to a row
getStartEndBorderWidths
public int[] getStartEndBorderWidths()
Returns the widths of the start- and end-borders of the span this grid unit belongs
to.
- a two-element array containing the widths of the start-border then the
end-border
getTableBody
public TableBody getTableBody()
Returns the fo:table-header/footer/body element containing this cell.
hasSpanning
public boolean hasSpanning()
- true if this cell spans over more than one grid unit.
mustKeepWithNext
public boolean mustKeepWithNext()
Returns true if the last child block (or its descendants) of this cell has
keep-with-next.
- the value of keep-with-next
mustKeepWithPrevious
public boolean mustKeepWithPrevious()
Returns true if the first child block (or its descendants) of this cell has
keep-with-previous.
- the value of keep-with-previous
setBreakAfter
public void setBreakAfter(int breakAfter)
Don't use, reserved for TableCellLM. TODO
breakAfter
- the breakAfter to set
setBreakBefore
public void setBreakBefore(int breakBefore)
Don't use, reserved for TableCellLM. TODO
breakBefore
- the breakBefore to set
setElements
public void setElements(LinkedList elements)
Sets the Knuth elements for the table cell containing this grid unit.
elements
- a list of ListElement (?)
setKeepWithNext
public void setKeepWithNext()
Don't use, reserved for TableCellLM. TODO
setKeepWithPrevious
public void setKeepWithPrevious()
Don't use, reserved for TableCellLM. TODO