org.jfor.jfor.rtflib.rtfdoc
Class RtfTableRow

java.lang.Object
  extended by org.jfor.jfor.rtflib.rtfdoc.RtfElement
      extended by org.jfor.jfor.rtflib.rtfdoc.RtfContainer
          extended by org.jfor.jfor.rtflib.rtfdoc.RtfTableRow
All Implemented Interfaces:
ITableAttributes

public class RtfTableRow
extends RtfContainer
implements ITableAttributes

Container for RtfTableCell elements

Author:
Bertrand Delacretaz bdelacretaz@codeconsult.ch

Field Summary
 
Fields inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
m_attrib, m_parent, m_writer
 
Fields inherited from interface org.jfor.jfor.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_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, 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
RtfTableRow(RtfTable parent, java.io.Writer w, int idNum)
          Create an RTF element as a child of given container
RtfTableRow(RtfTable parent, java.io.Writer w, RtfAttributes attrs, int idNum)
          Create an RTF element as a child of given container
 
Method Summary
(package private)  RtfExtraRowSet getExtraRowSet()
           
 boolean isFirstRow()
           
 boolean isHighestCell(int id)
           
 RtfTableCell newTableCell(int cellWidth)
          close current cell if any and start a new one
 RtfTableCell newTableCell(int cellWidth, RtfAttributes attrs)
          close current cell if any and start a new one
 RtfTableCell newTableCellMergedHorizontally(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.
 RtfTableCell newTableCellMergedVertically(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.
protected  void writeRtfContent()
          overridden to write trowd and cell definitions before writing our cells
protected  void writeRtfPrefix()
          called before writeRtfContent()
protected  void writeRtfSuffix()
          overridden to write RTF suffix code, what comes after our children
 
Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfContainer
addChild, containsText, dump, getChildCount, getChildren, getOptions, isEmpty, okToWriteRtf, setChildren, setOptions, toString
 
Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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

Throws:
java.io.IOException

newTableCell

public RtfTableCell newTableCell(int cellWidth,
                                 RtfAttributes attrs)
                          throws java.io.IOException
close current cell if any and start a new one

Throws:
java.io.IOException

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.

Throws:
java.io.IOException

newTableCellMergedHorizontally

public RtfTableCell newTableCellMergedHorizontally(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 previous cell.

Throws:
java.io.IOException

writeRtfPrefix

protected void writeRtfPrefix()
                       throws java.io.IOException
Description copied from class: RtfElement
called before writeRtfContent()

Overrides:
writeRtfPrefix in class RtfElement
Throws:
java.io.IOException

writeRtfContent

protected void writeRtfContent()
                        throws java.io.IOException
overridden to write trowd and cell definitions before writing our cells

Overrides:
writeRtfContent in class RtfContainer
Throws:
java.io.IOException

writeRtfSuffix

protected void writeRtfSuffix()
                       throws java.io.IOException
overridden to write RTF suffix code, what comes after our children

Overrides:
writeRtfSuffix in class RtfElement
Throws:
java.io.IOException

getExtraRowSet

RtfExtraRowSet getExtraRowSet()

isFirstRow

public boolean isFirstRow()

isHighestCell

public boolean isHighestCell(int id)