Class RtfAfterBeforeBase
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfAfterBeforeBase
-
- All Implemented Interfaces:
IRtfExternalGraphicContainer,IRtfParagraphContainer,IRtfTableContainer,IRtfTextrunContainer
abstract class RtfAfterBeforeBase extends RtfContainer implements IRtfParagraphContainer, IRtfExternalGraphicContainer, IRtfTableContainer, IRtfTextrunContainer
Common code for RtfAfter and RtfBefore.
This work was authored by Andreas Lambert (andreas.lambert@cronidesoft.com), Christopher Scott (scottc@westinghouse.com), and Christoph Zahm (zahm@jnet.ch) [support for tables in headers/footers].
-
-
Field Summary
Fields Modifier and Type Field Description private RtfExternalGraphicexternalGraphicprivate RtfParagraphparaprivate RtfTabletable-
Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
attrib, parent, writer
-
-
Constructor Summary
Constructors Constructor Description RtfAfterBeforeBase(RtfSection parent, java.io.Writer w, RtfAttributes attrs)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidcloseAll()private voidcloseCurrentExternalGraphic()private voidcloseCurrentParagraph()private voidcloseCurrentTable()RtfAttributesgetAttributes()RtfTextrungetTextrun()Returns the current RtfTextrun object.RtfExternalGraphicnewImage()Creates a new image on external graphic base.RtfParagraphnewParagraph()Close current paragraph, if any, and start a new one with default attributes.RtfParagraphnewParagraph(RtfAttributes attrs)Close current paragraph, if any, and start a new one with specified attributesRtfTablenewTable(ITableColumnsInfo tc)close current table if any and start a new oneRtfTablenewTable(RtfAttributes attrs, ITableColumnsInfo tc)close current table if any and start a new oneprotected abstract voidwriteMyAttributes()must be implemented to write the header or footer attributesprotected voidwriteRtfPrefix()Called before writeRtfContent()protected voidwriteRtfSuffix()Called after writeRtfContent()-
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
addChild, containsText, dump, findChildren, getChildCount, getChildren, getOptions, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent
-
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
-
-
-
-
Field Detail
-
para
private RtfParagraph para
-
externalGraphic
private RtfExternalGraphic externalGraphic
-
table
private RtfTable table
-
-
Constructor Detail
-
RtfAfterBeforeBase
RtfAfterBeforeBase(RtfSection parent, java.io.Writer w, RtfAttributes attrs) throws java.io.IOException
- Throws:
java.io.IOException
-
-
Method Detail
-
newParagraph
public RtfParagraph newParagraph() throws java.io.IOException
Description copied from interface:IRtfParagraphContainerClose current paragraph, if any, and start a new one with default attributes.- Specified by:
newParagraphin interfaceIRtfParagraphContainer- Returns:
- new paragraph object
- Throws:
java.io.IOException- for I/O problems.
-
newParagraph
public RtfParagraph newParagraph(RtfAttributes attrs) throws java.io.IOException
Description copied from interface:IRtfParagraphContainerClose current paragraph, if any, and start a new one with specified attributes- Specified by:
newParagraphin interfaceIRtfParagraphContainer- Parameters:
attrs- attributes for new paragraph- Returns:
- new paragraph object
- Throws:
java.io.IOException- for I/O problems.
-
newImage
public RtfExternalGraphic newImage() throws java.io.IOException
Description copied from interface:IRtfExternalGraphicContainerCreates a new image on external graphic base.- Specified by:
newImagein interfaceIRtfExternalGraphicContainer- Returns:
- RtfExternalGraphic for the new image
- Throws:
java.io.IOException- On error
-
closeCurrentParagraph
private void closeCurrentParagraph() throws java.io.IOException- Throws:
java.io.IOException
-
closeCurrentExternalGraphic
private void closeCurrentExternalGraphic() throws java.io.IOException- Throws:
java.io.IOException
-
closeCurrentTable
private void closeCurrentTable() throws java.io.IOException- Throws:
java.io.IOException
-
writeRtfPrefix
protected void writeRtfPrefix() throws java.io.IOExceptionDescription copied from class:RtfElementCalled before writeRtfContent()- Overrides:
writeRtfPrefixin classRtfElement- Throws:
java.io.IOException- for I/O problems
-
writeMyAttributes
protected abstract void writeMyAttributes() throws java.io.IOExceptionmust be implemented to write the header or footer attributes- Throws:
java.io.IOException
-
writeRtfSuffix
protected void writeRtfSuffix() throws java.io.IOExceptionDescription copied from class:RtfElementCalled after writeRtfContent()- Overrides:
writeRtfSuffixin classRtfElement- Throws:
java.io.IOException- for I/O problems
-
getAttributes
public RtfAttributes getAttributes()
-
closeAll
public void closeAll() throws java.io.IOException- Throws:
java.io.IOException
-
newTable
public RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc) throws java.io.IOException
close current table if any and start a new one- Specified by:
newTablein interfaceIRtfTableContainer- Parameters:
tc- added by Boris Poudérous on july 2002 in order to process number-columns-spanned attributeattrs- for the Table attributes- Returns:
- new table object
- Throws:
java.io.IOException- for I/O problems
-
newTable
public RtfTable newTable(ITableColumnsInfo tc) throws java.io.IOException
close current table if any and start a new one- Specified by:
newTablein interfaceIRtfTableContainer- Parameters:
tc- Table Columns Info- Returns:
- new table object
- Throws:
java.io.IOException- for I/O problems
-
getTextrun
public RtfTextrun getTextrun() throws java.io.IOException
Description copied from interface:IRtfTextrunContainerReturns the current RtfTextrun object. Opens a new one if necessary.- Specified by:
getTextrunin interfaceIRtfTextrunContainer- Returns:
- The RtfTextrun object
- Throws:
java.io.IOException- Thrown when an IO-problem occurs
-
-