org.jfor.jfor.rtflib.rtfdoc
Class RtfExtraRowSet

java.lang.Object
  extended byorg.jfor.jfor.rtflib.rtfdoc.RtfElement
      extended byorg.jfor.jfor.rtflib.rtfdoc.RtfContainer
          extended byorg.jfor.jfor.rtflib.rtfdoc.RtfExtraRowSet

public class RtfExtraRowSet
extends RtfContainer

Used to add extra table rows after a row that contains a nested table:

  • created by RtfTableRow before generating RTF code
  • an RtfTableCell that contains a nested table can ask this to put some of its children in extra rows that after the current row
  • once RtfTableRow is done rendering its children, it renders this, causing extra rows to be generated, with content that can come from several RtfTableCells

    Author:
    Bertrand Delacretaz bdelacretaz@codeconsult.ch
    See Also:
    org.jfor.jfor.rtflib.testdoc.NestedTable

    Field Summary
    (package private)  int DEFAULT_IDNUM
               
     
    Fields inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
    m_attrib, m_parent, m_writer
     
    Constructor Summary
    (package private) RtfExtraRowSet(java.io.Writer w)
              an RtfExtraRowSet has no parent, it is only used temporary during generation of RTF for an RtfTableRow
     
    Method Summary
    (package private)  int addTable(RtfTable tbl, int rowIndex, int xOffset)
              Add all cells of given Table to this set for later rendering in extra rows
    (package private)  RtfTableCell createExtraCell(int rowIndex, int xOffset, int cellWidth, RtfAttributes parentCellAttributes)
              create an extra cell to hold content that comes after a nested table in a cell Modified by Boris Poud?rous in order to permit the extra cell to have the attributes of its parent cell
     ITableColumnsInfo getParentITableColumnsInfo()
               
     boolean isEmpty()
              As this contains cells from several rows, we say that it's empty only if we have no cells.
     void setParentITableColumnsInfo(ITableColumnsInfo parentITableColumnsInfo)
               
    protected  void writeRtfContent()
              render extra RtfTableRows containing all the extra RtfTableCells that we contain
     
    Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfContainer
    addChild, containsText, dump, getChildCount, getChildren, getOptions, 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, writeRtfPrefix, writeRtfSuffix, writeStarControlWord, writeStarControlWordNS
     
    Methods inherited from class java.lang.Object
    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
     

    Field Detail

    DEFAULT_IDNUM

    final int DEFAULT_IDNUM
    See Also:
    Constant Field Values
    Constructor Detail

    RtfExtraRowSet

    RtfExtraRowSet(java.io.Writer w)
             throws java.io.IOException
    an RtfExtraRowSet has no parent, it is only used temporary during generation of RTF for an RtfTableRow

    Method Detail

    addTable

    int addTable(RtfTable tbl,
                 int rowIndex,
                 int xOffset)
    Add all cells of given Table to this set for later rendering in extra rows

    Parameters:
    rowIndex - index of first extra row to create to hold cells of tbl
    xOffset - horizontal position of left edge of first column of tbl
    Returns:
    index of extra row to use for elements that follow this table in the same cell

    createExtraCell

    RtfTableCell createExtraCell(int rowIndex,
                                 int xOffset,
                                 int cellWidth,
                                 RtfAttributes parentCellAttributes)
                           throws java.io.IOException
    create an extra cell to hold content that comes after a nested table in a cell Modified by Boris Poud?rous in order to permit the extra cell to have the attributes of its parent cell

    Throws:
    java.io.IOException

    writeRtfContent

    protected void writeRtfContent()
                            throws java.io.IOException
    render extra RtfTableRows containing all the extra RtfTableCells that we contain

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

    isEmpty

    public boolean isEmpty()
    As this contains cells from several rows, we say that it's empty only if we have no cells. writeRow makes the decision about rendering specific rows

    Overrides:
    isEmpty in class RtfContainer

    getParentITableColumnsInfo

    public ITableColumnsInfo getParentITableColumnsInfo()
    Returns:
    The table context of the parent table Added by Boris Poud?rous on july 2002 in order to process nested tables

    setParentITableColumnsInfo

    public void setParentITableColumnsInfo(ITableColumnsInfo parentITableColumnsInfo)