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

## Class RtfBefore

- 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.RtfBefore

- All Implemented Interfaces:
    IRtfExternalGraphicContainer, IRtfParagraphContainer, IRtfTableContainer, IRtfTextrunContainer

      public class RtfBefore
      extends RtfContainer

  The opposite of RtfAfter

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `HEADER` RtfBefore attributes
    `static java.lang.String[]` | `HEADER_ATTR` String array of attribute names

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

      `attrib, parent, writer`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `closeAll()`
    `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 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 void` | `writeMyAttributes()` Write the attributes for this element
    `protected void` | `writeRtfPrefix()` Called before writeRtfContent()
    `protected void` | `writeRtfSuffix()` Called after writeRtfContent()

    - ### Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer

      `addChild, findChildren, getChildCount, getChildren, isEmpty, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent`

    - ### Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement

      `close, getParentOfClass, getRtfAttributes, newLine, 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

    - #### HEADER

          public static final java.lang.String HEADER

      RtfBefore attributes
      See Also:
        Constant Field Values

    - #### HEADER_ATTR

          public static final java.lang.String[] HEADER_ATTR

      String array of attribute names

  - ### Method Detail

    - #### writeMyAttributes

          protected void writeMyAttributes()
                                    throws java.io.IOException

      Write the attributes for this element
      Throws:
        `java.io.IOException` - for I/O problems

    - #### 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`
      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 interface `IRtfParagraphContainer`
      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 interface `IRtfExternalGraphicContainer`
      Returns:
        RtfExternalGraphic for the new image
      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` - for I/O problems

    - #### 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` - 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 interface `IRtfTableContainer`
      Parameters:
        `tc` - added by Boris Poudérous on july 2002 in order to process number-columns-spanned attribute
        `attrs` - 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 interface `IRtfTableContainer`
      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 interface `IRtfTextrunContainer`
      Returns:
        The RtfTextrun object
      Throws:
        `java.io.IOException` - Thrown when an IO-problem occurs

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