org.jfor.jfor.rtflib.rtfdoc
Class RtfAfterBeforeBase

java.lang.Object
  extended byorg.jfor.jfor.rtflib.rtfdoc.RtfElement
      extended byorg.jfor.jfor.rtflib.rtfdoc.RtfContainer
          extended byorg.jfor.jfor.rtflib.rtfdoc.RtfAfterBeforeBase
All Implemented Interfaces:
IRtfExternalGraphicContainer, IRtfParagraphContainer, IRtfTableContainer
Direct Known Subclasses:
RtfAfter, RtfBefore

abstract class RtfAfterBeforeBase
extends RtfContainer
implements IRtfParagraphContainer, IRtfExternalGraphicContainer, IRtfTableContainer

Common code for RtfAfter and RtfBefore


Field Summary
protected  RtfAttributes m_attrib
           
 
Fields inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
m_parent, m_writer
 
Constructor Summary
(package private) RtfAfterBeforeBase(RtfSection parent, java.io.Writer w, RtfAttributes attrs)
           
 
Method Summary
 void closeAll()
           
 RtfAttributes getAttributes()
           
 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 attributes
 RtfTable newTable(ITableColumnsInfo tc)
          close current table if any and start a new one
 RtfTable newTable(RtfAttributes attrs, ITableColumnsInfo tc)
          close current table if any and start a new one
protected abstract  void writeMyAttributes()
          must be implemented to write the header or footer attributes
protected  void writeRtfPrefix()
          called before writeRtfContent()
protected  void writeRtfSuffix()
          called after writeRtfContent()
 
Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfContainer
addChild, containsText, dump, getChildCount, getChildren, getOptions, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent
 
Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

m_attrib

protected RtfAttributes m_attrib
Constructor Detail

RtfAfterBeforeBase

RtfAfterBeforeBase(RtfSection parent,
                   java.io.Writer w,
                   RtfAttributes attrs)
             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 interface IRtfParagraphContainer
Throws:
java.io.IOException

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 interface IRtfParagraphContainer
Throws:
java.io.IOException

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 interface IRtfExternalGraphicContainer
Throws:
java.io.IOException - On error

writeRtfPrefix

protected void writeRtfPrefix()
                       throws java.io.IOException
Description copied from class: RtfElement
called before writeRtfContent()

Overrides:
writeRtfPrefix in class RtfElement
Throws:
java.io.IOException

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 class RtfElement
Throws:
java.io.IOException

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 interface IRtfTableContainer
Parameters:
tc - added by Boris Poud?rous on july 2002 in order to process number-columns-spanned attribute
Throws:
java.io.IOException

newTable

public RtfTable newTable(ITableColumnsInfo tc)
                  throws java.io.IOException
close current table if any and start a new one

Specified by:
newTable in interface IRtfTableContainer
Throws:
java.io.IOException