Class RtfTableRow
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfTableRow
-
- All Implemented Interfaces:
ITableAttributes
public class RtfTableRow extends RtfContainer implements ITableAttributes
Container for RtfTableCell elements.
This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch), Andreas Putz (a.putz@skynamics.com), and Roberto Marra (roberto@link-u.com).
-
-
Field Summary
Fields Modifier and Type Field Description private RtfTableCellcellprivate inthighestCellprivate intid-
Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
attrib, parent, writer
-
Fields inherited from interface org.apache.fop.render.rtf.rtflib.rtfdoc.ITableAttributes
ATTR_CELL_PADDING_BOTTOM, ATTR_CELL_PADDING_LEFT, ATTR_CELL_PADDING_RIGHT, ATTR_CELL_PADDING_TOP, ATTR_CELL_U_PADDING_BOTTOM, ATTR_CELL_U_PADDING_LEFT, ATTR_CELL_U_PADDING_RIGHT, ATTR_CELL_U_PADDING_TOP, ATTR_CELL_VERT_ALIGN_BOTTOM, ATTR_CELL_VERT_ALIGN_CENTER, ATTR_CELL_VERT_ALIGN_TOP, ATTR_HEADER, ATTR_ROW_LEFT_INDENT, ATTR_ROW_PADDING_BOTTOM, ATTR_ROW_PADDING_LEFT, ATTR_ROW_PADDING_RIGHT, ATTR_ROW_PADDING_TOP, ATTR_ROW_U_PADDING_BOTTOM, ATTR_ROW_U_PADDING_LEFT, ATTR_ROW_U_PADDING_RIGHT, ATTR_ROW_U_PADDING_TOP, ATTR_RTF_15_TRGAPH, ATTRIB_CELL_PADDING, ATTRIB_ROW_PADDING, CELL_BORDER, CELL_BORDER_BOTTOM, CELL_BORDER_LEFT, CELL_BORDER_RIGHT, CELL_BORDER_TOP, CELL_COLOR, CELL_COLOR_BACKGROUND, CELL_COLOR_FOREGROUND, CELL_SHADE, CELL_VERT_ALIGN, COLUMN_SPAN, ROW_BORDER, ROW_BORDER_BOTTOM, ROW_BORDER_HORIZONTAL, ROW_BORDER_LEFT, ROW_BORDER_RIGHT, ROW_BORDER_TOP, ROW_BORDER_VERTICAL, ROW_HEIGHT, ROW_KEEP_TOGETHER, ROW_KEEP_WITH_NEXT, ROW_KEEP_WITH_PREVIOUS, ROW_SPAN
-
-
Constructor Summary
Constructors Constructor Description RtfTableRow(RtfTable parent, java.io.Writer w, int idNum)Create an RTF element as a child of given containerRtfTableRow(RtfTable parent, java.io.Writer w, RtfAttributes attrs, int idNum)Create an RTF element as a child of given container
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidadjustBorderProperties(RtfTable parentTable)RtfTablegetTable()booleanisFirstRow()booleanisHighestCell(int cellId)RtfTableCellnewTableCell(int cellWidth)Close current cell if any and start a new oneRtfTableCellnewTableCell(int cellWidth, RtfAttributes attrs)Close current cell if any and start a new oneRtfTableCellnewTableCellMergedHorizontally(int cellWidth, RtfAttributes attrs)Added by Boris POUDEROUS on 07/02/2002 in order to add an empty cell that is merged with the previous cell.RtfTableCellnewTableCellMergedVertically(int cellWidth, RtfAttributes attrs)Added by Boris POUDEROUS on 07/02/2002 in order to add an empty cell that is merged with the cell above.private voidwritePaddingAttributes()voidwriteRowAndCellsDefintions()protected voidwriteRtfContent()Overridden to write trowd and cell definitions before writing our cellsprotected voidwriteRtfPrefix()Called before writeRtfContent()protected voidwriteRtfSuffix()Overridden to write RTF suffix code, what comes after our children-
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
addChild, containsText, dump, findChildren, getChildCount, getChildren, getOptions, isEmpty, okToWriteRtf, setChildren, setOptions, toString
-
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
-
-
-
-
Field Detail
-
cell
private RtfTableCell cell
-
id
private int id
-
highestCell
private int highestCell
-
-
Constructor Detail
-
RtfTableRow
RtfTableRow(RtfTable parent, java.io.Writer w, int idNum) throws java.io.IOException
Create an RTF element as a child of given container- Throws:
java.io.IOException
-
RtfTableRow
RtfTableRow(RtfTable parent, java.io.Writer w, RtfAttributes attrs, int idNum) throws java.io.IOException
Create an RTF element as a child of given container- Throws:
java.io.IOException
-
-
Method Detail
-
newTableCell
public RtfTableCell newTableCell(int cellWidth) throws java.io.IOException
Close current cell if any and start a new one- Parameters:
cellWidth- width of new cell- Returns:
- new RtfTableCell
- Throws:
java.io.IOException- for I/O problems
-
newTableCell
public RtfTableCell newTableCell(int cellWidth, RtfAttributes attrs) throws java.io.IOException
Close current cell if any and start a new one- Parameters:
attrs- attributes of new cellcellWidth- width of new cell- Returns:
- new RtfTableCell
- Throws:
java.io.IOException- for I/O problems
-
newTableCellMergedVertically
public RtfTableCell newTableCellMergedVertically(int cellWidth, RtfAttributes attrs) throws java.io.IOException
Added by Boris POUDEROUS on 07/02/2002 in order to add an empty cell that is merged with the cell above. This cell is placed before or after the nested table.- Parameters:
attrs- attributes of new cellcellWidth- width of new cell- Returns:
- new RtfTableCell
- Throws:
java.io.IOException- for I/O problems
-
newTableCellMergedHorizontally
public RtfTableCell newTableCellMergedHorizontally(int cellWidth, RtfAttributes attrs) throws java.io.IOException, FOPException
Added by Boris POUDEROUS on 07/02/2002 in order to add an empty cell that is merged with the previous cell.- Parameters:
attrs- attributes of new cellcellWidth- width of new cell- Returns:
- new RtfTableCell
- Throws:
java.io.IOException- for I/O problemsFOPException- if attributes cannot be cloned
-
writeRtfPrefix
protected void writeRtfPrefix() throws java.io.IOExceptionDescription copied from class:RtfElementCalled before writeRtfContent()- Overrides:
writeRtfPrefixin classRtfElement- Throws:
java.io.IOException- for I/O problems
-
writeRtfContent
protected void writeRtfContent() throws java.io.IOExceptionOverridden to write trowd and cell definitions before writing our cells- Overrides:
writeRtfContentin classRtfContainer- Throws:
java.io.IOException- for I/O problems
-
writeRowAndCellsDefintions
public void writeRowAndCellsDefintions() throws java.io.IOException- Throws:
java.io.IOException- In case of a IO-problem
-
adjustBorderProperties
private void adjustBorderProperties(RtfTable parentTable)
-
writeRtfSuffix
protected void writeRtfSuffix() throws java.io.IOExceptionOverridden to write RTF suffix code, what comes after our children- Overrides:
writeRtfSuffixin classRtfElement- Throws:
java.io.IOException- for I/O problems
-
writePaddingAttributes
private void writePaddingAttributes() throws java.io.IOException- Throws:
java.io.IOException
-
isFirstRow
public boolean isFirstRow()
- Returns:
- true if the row is the first in the table
-
isHighestCell
public boolean isHighestCell(int cellId)
- Parameters:
cellId- cell id to check- Returns:
- true if the cell is the highest cell
-
getTable
public RtfTable getTable()
- Returns:
- Parent table of the row.
-
-