/**
* @see org.apache.fop.fo.FOEventHandler#startDocument()
+ * @throws SAXException In case of a IO-problem
*/
public void startDocument() throws SAXException {
// TODO sections should be created
/**
* @see org.apache.fop.fo.FOEventHandler#endDocument()
+ * @throws SAXException In case of a IO-problem
*/
public void endDocument() throws SAXException {
try {
/**
* @see org.apache.fop.fo.FOEventHandler
+ * @param pageSeq PageSequence that is starting
*/
public void startPageSequence(PageSequence pageSeq) {
try {
/**
* @see org.apache.fop.fo.FOEventHandler#endPageSequence(PageSequence)
+ * @param pageSeq PageSequence that is ending
*/
public void endPageSequence(PageSequence pageSeq) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startFlow(Flow)
+ * @param fl Flow that is starting
*/
public void startFlow(Flow fl) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endFlow(Flow)
+ * @param fl Flow that is ending
*/
public void endFlow(Flow fl) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startBlock(Block)
+ * @param bl Block that is starting
*/
public void startBlock(Block bl) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endBlock(Block)
+ * @param bl Block that is ending
*/
public void endBlock(Block bl) {
/**
* @see org.apache.fop.fo.FOEventHandler#startBlockContainer(BlockContainer)
+ * @param blc BlockContainer that is starting
*/
public void startBlockContainer(BlockContainer blc) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endBlockContainer(BlockContainer)
+ * @param bl BlockContainer that is ending
*/
public void endBlockContainer(BlockContainer bl) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startTable(Table)
+ * @param tbl Table that is starting
*/
public void startTable(Table tbl) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endTable(Table)
+ * @param tbl Table that is ending
*/
public void endTable(Table tbl) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startHeader(TableBody)
+ * @param th TableBody that is starting
*/
public void startHeader(TableBody th) {
}
/**
* @see org.apache.fop.fo.FOEventHandler#endHeader(TableBody)
+ * @param th TableBody that is ending
*/
public void endHeader(TableBody th) {
}
/**
* @see org.apache.fop.fo.FOEventHandler#startFooter(TableBody)
+ * @param tf TableFooter that is starting
*/
public void startFooter(TableBody tf) {
}
/**
* @see org.apache.fop.fo.FOEventHandler#endFooter(TableBody)
+ * @param tf TableFooter that is ending
*/
public void endFooter(TableBody tf) {
}
/**
* @see org.apache.fop.fo.FOEventHandler#startBody(TableBody)
+ * @param tb TableBody that is starting
*/
public void startBody(TableBody tb) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endBody(TableBody)
+ * @param tb TableBody that is ending
*/
public void endBody(TableBody tb) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startRow(TableRow)
+ * @param tr TableRow that is starting
*/
public void startRow(TableRow tr) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endRow(TableRow)
+ * @param tr TableRow that is ending
*/
public void endRow(TableRow tr) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startCell(TableCell)
+ * @param tc TableCell that is starting
*/
public void startCell(TableCell tc) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endCell(TableCell)
+ * @param tc TableCell that is ending
*/
public void endCell(TableCell tc) {
if (bDefer) {
// Lists
/**
* @see org.apache.fop.fo.FOEventHandler#startList(ListBlock)
+ * @param lb ListBlock that is starting
*/
public void startList(ListBlock lb) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endList(ListBlock)
+ * @param lb ListBlock that is ending
*/
public void endList(ListBlock lb) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startListItem(ListItem)
+ * @param li ListItem that is starting
*/
public void startListItem(ListItem li) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endListItem(ListItem)
+ * @param li ListItem that is ending
*/
public void endListItem(ListItem li) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startLink(BasicLink basicLink)
+ * @param basicLink BasicLink that is starting
*/
public void startLink(BasicLink basicLink) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#image(ExternalGraphic)
+ * @param eg ExternalGraphic that is starting
*/
public void image(ExternalGraphic eg) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#foreignObject(InstreamForeignObject)
+ * @param ifo InstreamForeignObject that is starting
*/
public void foreignObject(InstreamForeignObject ifo) {
}
/**
* @see org.apache.fop.fo.FOEventHandler#startFootnote(Footnote)
+ * @param footnote Footnote that is starting
*/
public void startFootnote(Footnote footnote) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endFootnote(Footnote)
+ * @param footnote Footnote that is ending
*/
public void endFootnote(Footnote footnote) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#startFootnoteBody(FootnoteBody)
+ * @param body FootnoteBody that is starting
*/
public void startFootnoteBody(FootnoteBody body) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#endFootnoteBody(FootnoteBody)
+ * @param body FootnoteBody that is ending
*/
public void endFootnoteBody(FootnoteBody body) {
if (bDefer) {
/**
* @see org.apache.fop.fo.FOEventHandler#leader(Leader)
+ * @param l Leader that is starting
*/
public void leader(Leader l) {
}
/**
- * @see org.apache.fop.fo.FOEventHandler#characters(char[], int, int)
+ * @param text FOText object
+ * @param data Array of characters to process.
+ * @param start Offset for characters to process.
+ * @param length Portion of array to process.
*/
public void text(FOText text, char[] data, int start, int length) {
if (bDefer) {
super.writeRtfContent();
}
+ /**
+ *
+ * @throws IOException In case of a IO-problem
+ */
public void writeRowAndCellsDefintions() throws IOException {
// render the row and cells definitions
writeControlWord("trowd");
// Added by Normand Masse
// Adjust the cell's display attributes so the table's/row's borders
// are drawn properly.
- RtfTableCell cell = (RtfTableCell)e;
+ RtfTableCell rtfcell = (RtfTableCell)e;
if (index == 0) {
- if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_LEFT)) {
- cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_LEFT,
+ if (!rtfcell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_LEFT)) {
+ rtfcell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_LEFT,
(String)attrib.getValue(ITableAttributes.ROW_BORDER_LEFT));
}
}
if (index == this.getChildCount() - 1) {
- if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_RIGHT)) {
- cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_RIGHT,
+ if (!rtfcell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_RIGHT)) {
+ rtfcell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_RIGHT,
(String)attrib.getValue(ITableAttributes.ROW_BORDER_RIGHT));
}
}
if (isFirstRow()) {
- if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_TOP)) {
- cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_TOP,
+ if (!rtfcell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_TOP)) {
+ rtfcell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_TOP,
(String)attrib.getValue(ITableAttributes.ROW_BORDER_TOP));
}
}
if ((parentTable != null) && (parentTable.isHighestRow(id))) {
- if (!cell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_BOTTOM)) {
- cell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_BOTTOM,
+ if (!rtfcell.getRtfAttributes().isSet(ITableAttributes.CELL_BORDER_BOTTOM)) {
+ rtfcell.getRtfAttributes().set(ITableAttributes.CELL_BORDER_BOTTOM,
(String)attrib.getValue(ITableAttributes.ROW_BORDER_BOTTOM));
}
}
- xPos = cell.writeCellDef(xPos);
+ xPos = rtfcell.writeCellDef(xPos);
}
index++; // Added by Boris POUDEROUS on 2002/07/02
}
}
/**
- * @param id cell id to check
+ * @param cellId cell id to check
* @return true if the cell is the highest cell
*/
- public boolean isHighestCell(int id) {
- return (highestCell == id) ? true : false;
+ public boolean isHighestCell(int cellId) {
+ return (highestCell == cellId) ? true : false;
}
+ /**
+ *
+ * @return Parent table of the row.
+ */
public RtfTable getTable() {
RtfElement e = this;
while (e.parent != null) {
private boolean bNextRowBelongsToHeader = false;
+ /**
+ *
+ * @param value Specifies, if next row belongs to header
+ */
public void setNextRowBelongsToHeader(boolean value) {
this.bNextRowBelongsToHeader = value;
}
+ /**
+ *
+ * @return true, if next row belongs to header
+ */
public boolean getNextRowBelongsToHeader() {
return bNextRowBelongsToHeader;
}
+ /**
+ *
+ * @param ctx BuilderContext
+ */
public TableContext(BuilderContext ctx) {
context = ctx;
}
+ /**
+ *
+ * @param width Width of next column
+ * @throws Exception
+ */
public void setNextColumnWidth(Float width)
throws Exception {
colWidths.add(width);
}
- //Added by Peter Herweg on 2002-06-29
+ /**
+ *
+ * @return RtfAttributes of current row-spanning cell
+ */
public RtfAttributes getColumnRowSpanningAttrs() {
return (RtfAttributes)colRowSpanningAttrs.get(colIndex);
}
- //Added by Peter Herweg on 2002-06-29
+ /**
+ *
+ * @return Number of currently spanned rows
+ */
public Integer getColumnRowSpanningNumber() {
return (Integer)colRowSpanningNumber.get(colIndex);
}
- //Added by Peter Herweg on 2002-06-29
- public void setCurrentColumnRowSpanning(Integer iRowSpanning, RtfAttributes attrs)
- throws Exception {
+ /**
+ *
+ * @param iRowSpanning number of rows to span
+ * @param attrs RtfAttributes of row-spanning cell
+ */
+ public void setCurrentColumnRowSpanning(
+ Integer iRowSpanning, RtfAttributes attrs) {
if (colIndex < colRowSpanningNumber.size()) {
colRowSpanningNumber.set(colIndex, iRowSpanning);
}
}
- //Added by Peter Herweg on 2002-06-29
+ /**
+ *
+ * @param iRowSpanning number of rows to span in next column
+ * @param attrs RtfAttributes of row-spanning cell
+ */
public void setNextColumnRowSpanning(Integer iRowSpanning,
RtfAttributes attrs) {
colRowSpanningNumber.add(iRowSpanning);