org.apache.fop.render.rtf.rtflib.rtfdoc

Class RtfSection

Implemented Interfaces:
IRtfAfterContainer, IRtfBeforeContainer, IRtfExternalGraphicContainer, IRtfJforCmdContainer, IRtfListContainer, IRtfParagraphContainer, IRtfParagraphKeepTogetherContainer, IRtfTableContainer, IRtfTextrunContainer

public class RtfSection
extends RtfContainer
implements IRtfParagraphContainer, IRtfTableContainer, IRtfListContainer, IRtfExternalGraphicContainer, IRtfBeforeContainer, IRtfParagraphKeepTogetherContainer, IRtfAfterContainer, IRtfJforCmdContainer, IRtfTextrunContainer

Models a section in an RTF document
Author:
Bertrand Delacretaz bdelacretaz@codeconsult.ch

Field Summary

Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement

attrib, parent, writer

Method Summary

RtfTextrun
getTextrun()
Returns the current RtfTextrun.
RtfAfter
newAfter(RtfAttributes attrs)
IRtfAfterContainer
RtfBefore
newBefore(RtfAttributes attrs)
IRtfBeforeContainer
RtfExternalGraphic
newImage()
Start a new external graphic after closing current paragraph, list and table
RtfJforCmd
newJforCmd(RtfAttributes attrs)
RtfList
newList(RtfAttributes attrs)
Start a new list after closing current paragraph, list and table
RtfParagraph
newParagraph()
Close current paragraph if any and start a new one with default attributes
RtfParagraph
newParagraph(RtfAttributes attrs)
Start a new paragraph after closing current paragraph, list and table
RtfParagraphKeepTogether
newParagraphKeepTogether()
Close current paragraph if any and start a new one
RtfTable
newTable(ITableColumnsInfo tc)
Start a new table after closing current paragraph, list and table
RtfTable
newTable(RtfAttributes attrs, ITableColumnsInfo tc)
Start a new table after closing current paragraph, list and table
protected void
writeRtfPrefix()
Can be overridden to write RTF prefix code, what comes before our children
protected void
writeRtfSuffix()
Can be overridden to write RTF suffix code, what comes after our children

Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer

addChild, getChildCount, getChildren, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent

Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement

close, getRtfAttributes, isEmpty, newLine, okToWriteRtf, toString, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeRtfContent, writeRtfPrefix, writeRtfSuffix, writeStarControlWord, writeStarControlWordNS

Method Details

getTextrun

public RtfTextrun getTextrun()
            throws IOException
Returns the current RtfTextrun.
Specified by:
getTextrun in interface IRtfTextrunContainer
Returns:
Current RtfTextrun

newAfter

public RtfAfter newAfter(RtfAttributes attrs)
            throws IOException
IRtfAfterContainer
Specified by:
newAfter in interface IRtfAfterContainer
Parameters:
attrs - attributes of new RtfAfter object
Returns:
new RtfAfter object

newBefore

public RtfBefore newBefore(RtfAttributes attrs)
            throws IOException
IRtfBeforeContainer
Specified by:
newBefore in interface IRtfBeforeContainer
Parameters:
attrs - attributes of new RtfBefore object
Returns:
new RtfBefore object

newImage

public RtfExternalGraphic newImage()
            throws IOException
Start a new external graphic after closing current paragraph, list and table
Specified by:
newImage in interface IRtfExternalGraphicContainer
Returns:
new RtfExternalGraphic object

newJforCmd

public RtfJforCmd newJforCmd(RtfAttributes attrs)
            throws IOException
Specified by:
newJforCmd in interface IRtfJforCmdContainer
Parameters:
attrs - attributes of new RtfJforCmd
Returns:
the new RtfJforCmd

newList

public RtfList newList(RtfAttributes attrs)
            throws IOException
Start a new list after closing current paragraph, list and table
Specified by:
newList in interface IRtfListContainer
Parameters:
attrs - attributes of new RftList object
Returns:
new RtfList

newParagraph

public RtfParagraph newParagraph()
            throws IOException
Close current paragraph if any and start a new one with default attributes
Specified by:
newParagraph in interface IRtfParagraphContainer
Returns:
new RtfParagraph

newParagraph

public RtfParagraph newParagraph(RtfAttributes attrs)
            throws IOException
Start a new paragraph after closing current paragraph, list and table
Specified by:
newParagraph in interface IRtfParagraphContainer
Parameters:
attrs - attributes for new RtfParagraph
Returns:
new RtfParagraph object

newParagraphKeepTogether

public RtfParagraphKeepTogether newParagraphKeepTogether()
            throws IOException
Close current paragraph if any and start a new one
Specified by:
newParagraphKeepTogether in interface IRtfParagraphKeepTogetherContainer
Returns:
new RtfParagraphKeepTogether

newTable

public RtfTable newTable(ITableColumnsInfo tc)
            throws IOException
Start a new table after closing current paragraph, list and table
Specified by:
newTable in interface IRtfTableContainer
Parameters:
tc - Table context used for number-columns-spanned attribute (added by Boris Poudérous on july 2002)
Returns:
new RtfTable object

newTable

public RtfTable newTable(RtfAttributes attrs,
                         ITableColumnsInfo tc)
            throws IOException
Start a new table after closing current paragraph, list and table
Specified by:
newTable in interface IRtfTableContainer
Parameters:
attrs - attributes of new RtfTable
tc - Table context used for number-columns-spanned attribute (added by Boris Poudérous on july 2002)
Returns:
new RtfTable object

writeRtfPrefix

protected void writeRtfPrefix()
            throws IOException
Can be overridden to write RTF prefix code, what comes before our children
Overrides:
writeRtfPrefix in interface RtfElement

writeRtfSuffix

protected void writeRtfSuffix()
            throws IOException
Can be overridden to write RTF suffix code, what comes after our children
Overrides:
writeRtfSuffix in interface RtfElement

Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.