Class RtfElement

java.lang.Object
com.lowagie.text.rtf.RtfElement
All Implemented Interfaces:
RtfBasicElement, com.lowagie.text.RtfElementInterface
Direct Known Subclasses:
RtfAnnotation, RtfBorder, RtfBorderGroup, RtfChunk, RtfCodePage, RtfColor, RtfColorList, RtfDocument, RtfDocumentHeader, RtfFontList, RtfFootnoteSetting, RtfGenerator, RtfImage, RtfInfoElement, RtfInfoGroup, RtfList, RtfListLevel, RtfListTable, RtfNewPage, RtfPageSetting, RtfPhrase, RtfPictureList, RtfProtectionSetting, RtfRow, RtfSection, RtfStylesheetList, RtfTable

public abstract class RtfElement extends Object implements RtfBasicElement
RtfElement is the base class for all RTF Element classes
Version:
$Id:RtfElement.java 3126 2008-02-07 20:30:46Z hallm $
  • Field Details

    • document

      protected RtfDocument document
      The RtfDocument this RtfElement belongs to
    • inTable

      protected boolean inTable
      Whether this RtfElement is in a table
    • inHeader

      protected boolean inHeader
      Whether this RtfElement is in a header
  • Constructor Details

    • RtfElement

      public RtfElement(RtfDocument doc)
      Constructs a RtfElement belonging to the specified RtfDocument.
      Parameters:
      doc - The RtfDocument this RtfElement belongs to
  • Method Details

    • intToByteArray

      public byte[] intToByteArray(int i)
      Transforms an integer into its String representation and then returns the bytes of that string.
      Parameters:
      i - The integer to convert
      Returns:
      A byte array representing the integer
    • writeContent

      public abstract void writeContent(OutputStream out) throws IOException
      Writes the element content to the given output stream.
      Specified by:
      writeContent in interface RtfBasicElement
      Parameters:
      out - The OutputStream to write the content to
      Throws:
      IOException
    • setRtfDocument

      public void setRtfDocument(RtfDocument doc)
      Sets the RtfDocument this RtfElement belongs to
      Specified by:
      setRtfDocument in interface RtfBasicElement
      Parameters:
      doc - The RtfDocument to use
    • isInTable

      public boolean isInTable()
      Gets whether this RtfElement is in a table
      Returns:
      Whether this RtfElement is in a table
    • setInTable

      public void setInTable(boolean inTable)
      Sets whether this RtfElement is in a table
      Specified by:
      setInTable in interface RtfBasicElement
      Parameters:
      inTable - True if this RtfElement is in a table, false otherwise
    • setInHeader

      public void setInHeader(boolean inHeader)
      Sets whether this RtfElement is in a header
      Specified by:
      setInHeader in interface RtfBasicElement
      Parameters:
      inHeader - True if this RtfElement is in a header, false otherwise