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

Class RtfFile


public class RtfFile
extends RtfContainer

Models the top-level structure of an RTF file.
Authors:
Bertrand Delacretaz bdelacretaz@codeconsult.ch
Andreas Putz a.putz@skynamics.com
Christopher Scott scottc@westinghouse.com

Field Summary

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

attrib, parent, writer

Constructor Summary

RtfFile(Writer w)
Create an RTF file that outputs to the given Writer

Method Summary

void
flush()
must be called when done creating the document
RtfDocumentArea
getDocumentArea()
Call startDocumentArea if needed and return the document area object.
RtfListTable
getListTable()
Get the list table.
RtfPageArea
getPageArea()
Call startPageArea if needed and return the page area object.
static void
main(String[] args)
minimal test and usage example
RtfDocumentArea
startDocumentArea()
Closes the RtfHeader if not done yet, and starts the document area.
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader
startHeader()
If called, must be called before startDocumentArea
RtfListTable
startListTable(RtfAttributes attr)
Creates the list table.
RtfPageArea
startPageArea()
Closes the RtfHeader if not done yet, and starts the docment area.
protected void
writeRtfPrefix()
overridden to write RTF prefix code, what comes before our children
protected void
writeRtfSuffix()
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

Constructor Details

RtfFile

public RtfFile(Writer w)
            throws IOException
Create an RTF file that outputs to the given Writer
Parameters:
w - the Writer to write to

Method Details

flush

public void flush()
            throws IOException
must be called when done creating the document

getDocumentArea

public RtfDocumentArea getDocumentArea()
            throws IOException
Call startDocumentArea if needed and return the document area object.
Returns:
the RtfDocumentArea

getListTable

public RtfListTable getListTable()
Get the list table.
Returns:
the RtfListTable

getPageArea

public RtfPageArea getPageArea()
            throws IOException
Call startPageArea if needed and return the page area object.
Returns:
the RtfPageArea

main

public static void main(String[] args)
            throws Exception
minimal test and usage example
Parameters:
args - command-line arguments

startDocumentArea

public RtfDocumentArea startDocumentArea()
            throws IOException
Closes the RtfHeader if not done yet, and starts the document area. Must be called once only.
Returns:
the RtfDocumentArea

startHeader

public org.apache.fop.render.rtf.rtflib.rtfdoc.RtfHeader startHeader()
            throws IOException
If called, must be called before startDocumentArea
Returns:
the new RtfHeader

startListTable

public RtfListTable startListTable(RtfAttributes attr)
            throws IOException
Creates the list table.
Parameters:
attr - attributes for the RtfListTable
Returns:
the new RtfListTable

startPageArea

public RtfPageArea startPageArea()
            throws IOException
Closes the RtfHeader if not done yet, and starts the docment area. Like startDocumentArea, is only called once. This is not optimal, must be able to have multiple page definition, and corresponding Document areas
Returns:
the RtfPageArea

writeRtfPrefix

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

writeRtfSuffix

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

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