Class RtfPhrase

  • All Implemented Interfaces:
    RtfBasicElement, com.lowagie.text.RtfElementInterface
    Direct Known Subclasses:
    RtfFootnote, RtfParagraph

    public class RtfPhrase
    extends RtfElement
    The RtfPhrase contains multiple RtfChunks
    Version:
    $Id: RtfPhrase.java 3580 2008-08-06 15:52:00Z howard_s $
    • Field Detail

      • PARAGRAPH_DEFAULTS

        public static final byte[] PARAGRAPH_DEFAULTS
        Constant for the resetting of the paragraph defaults
      • PLAIN

        public static final byte[] PLAIN
        Constant for resetting of font settings to their defaults
      • IN_TABLE

        public static final byte[] IN_TABLE
        Constant for phrase in a table indication
      • LINE_SPACING

        public static final byte[] LINE_SPACING
        Constant for the line spacing.
      • chunks

        protected final java.util.ArrayList<RtfBasicElement> chunks
        ArrayList containing the RtfChunks of this RtfPhrase
      • lineLeading

        private int lineLeading
        The height of each line.
    • Constructor Detail

      • RtfPhrase

        protected RtfPhrase​(RtfDocument doc)
        A basically empty constructor that is used by the RtfParagraph.
        Parameters:
        doc - The RtfDocument this RtfPhrase belongs to.
      • RtfPhrase

        public RtfPhrase​(RtfDocument doc,
                         com.lowagie.text.Phrase phrase)
        Constructs a new RtfPhrase for the RtfDocument with the given Phrase
        Parameters:
        doc - The RtfDocument this RtfPhrase belongs to
        phrase - The Phrase this RtfPhrase is based on
    • Method Detail

      • writeContent

        public void writeContent​(java.io.OutputStream result)
                          throws java.io.IOException
        Write the content of this RtfPhrase. First resets to the paragraph defaults then if the RtfPhrase is in a RtfCell a marker for this is written and finally the RtfChunks of this RtfPhrase are written.
        Specified by:
        writeContent in interface RtfBasicElement
        Specified by:
        writeContent in class RtfElement
        Parameters:
        result - The OutputStream to write the content to
        Throws:
        java.io.IOException
      • setInTable

        public void setInTable​(boolean inTable)
        Sets whether this RtfPhrase is in a table. Sets the correct inTable setting for all child elements.
        Specified by:
        setInTable in interface RtfBasicElement
        Overrides:
        setInTable in class RtfElement
        Parameters:
        inTable - True if this RtfPhrase is in a table, false otherwise
      • setInHeader

        public void setInHeader​(boolean inHeader)
        Sets whether this RtfPhrase is in a header. Sets the correct inTable setting for all child elements.
        Specified by:
        setInHeader in interface RtfBasicElement
        Overrides:
        setInHeader in class RtfElement
        Parameters:
        inHeader - True if this RtfPhrase is in a header, false otherwise