java.lang.Object
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
org.apache.fop.render.rtf.rtflib.rtfdoc.RtfText

public class RtfText extends RtfElement

Model of a text run (a piece of text with attributes) in an RTF document.

This work was authored by Bertrand Delacretaz (bdelacretaz@codeconsult.ch).

  • Field Details

  • Method Details

    • writeRtfContent

      public void writeRtfContent() throws IOException
      Write our text to the RTF stream
      Specified by:
      writeRtfContent in class RtfElement
      Throws:
      IOException - for I/O problems
    • getTextContainerAttributes

      public RtfAttributes getTextContainerAttributes() throws FOPException
      IRtfTextContainer requirement:
      Returns:
      a copy of our attributes
      Throws:
      FOPException - if attributes cannot be cloned
    • isEmpty

      public boolean isEmpty()
      Checks whether the text is empty.
      Specified by:
      isEmpty in class RtfElement
      Returns:
      true If m_text is null\n false m_text is set
    • isNbsp

      public boolean isNbsp()
      True if text contains a single non-breaking space (#160). TODO make this more general and/or merge with isEmpty? -- what happen with empty paragraphs, if they will be removed, than NO, else ok
      Returns:
      true If m_text is character 160\n false m_text is not a nbsp
    • isTab

      public boolean isTab()
      Returns:
      true if the text is a tab character
    • isNewLine

      public boolean isNewLine()
      Returns:
      true if text is a newline character
    • isBold

      public boolean isBold(boolean isStart)
      Parameters:
      isStart - set to true if processing the start of the text (??)
      Returns:
      true if text is bold
    • getTextAttributes

      public RtfAttributes getTextAttributes()
      Returns:
      the attributes of our text