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

Class RtfContainer

Known Direct Subclasses:
RtfBookmarkContainerImpl, RtfDocumentArea, RtfExtraRowSet, RtfFile, RtfFootnote, RtfHyperLink, RtfJforCmd, RtfList, RtfListItem, RtfListTable, RtfNull, RtfPage, RtfPageArea, RtfPageNumber, RtfPageNumberCitation, RtfParagraphKeepTogether, RtfSection, RtfTable, RtfTableCell, RtfTableRow, RtfTextrun

public class RtfContainer
extends RtfElement

An RtfElement that can contain other elements.
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

protected void
addChild(RtfElement e)
add a child element to this
int
getChildCount()
List
getChildren()
boolean
isEmpty()
protected boolean
okToWriteRtf()
boolean
setChildren(List list)
Add by Boris Poud??rous on 07/22/2002 Set the children list
void
setOptions(RtfOptions opt)
set options
String
toString()
minimal debugging display
protected void
writeRtfContent()
write RTF code of all our children

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

addChild

protected void addChild(RtfElement e)
            throws RtfStructureException
add a child element to this
Parameters:
e - child element to add
Throws:
RtfStructureException - for trying to add an invalid child (??)

getChildCount

public int getChildCount()
Returns:
the number of children

getChildren

public List getChildren()
Returns:
a copy of our children's list

isEmpty

public boolean isEmpty()
Overrides:
isEmpty in interface RtfElement
Returns:
true if this element would generate no "useful" RTF content, i.e. (for RtfContainer) true if it has no children where isEmpty() is false

okToWriteRtf

protected boolean okToWriteRtf()
Overrides:
okToWriteRtf in interface RtfElement
Returns:
false if empty or if our options block writing

setChildren

public boolean setChildren(List list)
Add by Boris Poud??rous on 07/22/2002 Set the children list
Parameters:
list - list of child objects
Returns:
true if process succeeded

setOptions

public void setOptions(RtfOptions opt)
set options
Parameters:
opt - options to set

toString

public String toString()
minimal debugging display
Overrides:
toString in interface RtfElement
Returns:
String representation of object contents

writeRtfContent

protected void writeRtfContent()
            throws IOException
write RTF code of all our children
Overrides:
writeRtfContent in interface RtfElement

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