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 RtfExternalGraphic
externalGraphic
private RtfParagraph
para
private RtfTable
table
-
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 void
closeAll()
private void
closeCurrentExternalGraphic()
private void
closeCurrentParagraph()
private void
closeCurrentTable()
RtfAttributes
getAttributes()
RtfTextrun
getTextrun()
Returns the current RtfTextrun object.RtfExternalGraphic
newImage()
Creates a new image on external graphic base.RtfParagraph
newParagraph()
Close current paragraph, if any, and start a new one with default attributes.RtfParagraph
newParagraph(RtfAttributes attrs)
Close current paragraph, if any, and start a new one with specified attributesRtfTable
newTable(ITableColumnsInfo tc)
close current table if any and start a new oneRtfTable
newTable(RtfAttributes attrs, ITableColumnsInfo tc)
close current table if any and start a new oneprotected abstract void
writeMyAttributes()
must be implemented to write the header or footer attributesprotected void
writeRtfPrefix()
Called before writeRtfContent()protected void
writeRtfSuffix()
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:IRtfParagraphContainer
Close current paragraph, if any, and start a new one with default attributes.- Specified by:
newParagraph
in 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:IRtfParagraphContainer
Close current paragraph, if any, and start a new one with specified attributes- Specified by:
newParagraph
in 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:IRtfExternalGraphicContainer
Creates a new image on external graphic base.- Specified by:
newImage
in 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.IOException
Description copied from class:RtfElement
Called before writeRtfContent()- Overrides:
writeRtfPrefix
in classRtfElement
- Throws:
java.io.IOException
- for I/O problems
-
writeMyAttributes
protected abstract void writeMyAttributes() throws java.io.IOException
must be implemented to write the header or footer attributes- Throws:
java.io.IOException
-
writeRtfSuffix
protected void writeRtfSuffix() throws java.io.IOException
Description copied from class:RtfElement
Called after writeRtfContent()- Overrides:
writeRtfSuffix
in 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:
newTable
in 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:
newTable
in 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:IRtfTextrunContainer
Returns the current RtfTextrun object. Opens a new one if necessary.- Specified by:
getTextrun
in interfaceIRtfTextrunContainer
- Returns:
- The RtfTextrun object
- Throws:
java.io.IOException
- Thrown when an IO-problem occurs
-
-