Class RtfParagraph

    • Method Detail

      • getText

        public java.lang.String getText()
        Accessor for the paragraph text
        Returns:
        the paragraph text
      • setKeepn

        public void setKeepn()
        Set the keepn attribute for this paragraph
      • setResetProperties

        public void setResetProperties()
        Force reset properties
      • writeRtfPrefix

        protected void writeRtfPrefix()
                               throws java.io.IOException
        Overridden to write our attributes before our content
        Overrides:
        writeRtfPrefix in class RtfElement
        Throws:
        java.io.IOException - for I/O problems
      • writeRtfSuffix

        protected void writeRtfSuffix()
                               throws java.io.IOException
        Overridden to close paragraph
        Overrides:
        writeRtfSuffix in class RtfElement
        Throws:
        java.io.IOException - for I/O problems
      • newText

        public RtfText newText​(java.lang.String str)
                        throws java.io.IOException
        Close current text run if any and start a new one with default attributes
        Specified by:
        newText in interface IRtfTextContainer
        Parameters:
        str - if not null, added to the RtfText created
        Returns:
        the new RtfText object
        Throws:
        java.io.IOException - for I/O problems
      • newText

        public RtfText newText​(java.lang.String str,
                               RtfAttributes attr)
                        throws java.io.IOException
        Close current text run if any and start a new one
        Specified by:
        newText in interface IRtfTextContainer
        Parameters:
        str - if not null, added to the RtfText created
        attr - attributes of the text
        Returns:
        the new RtfText object
        Throws:
        java.io.IOException - for I/O problems
      • newPageBreak

        public void newPageBreak()
                          throws java.io.IOException
        add a page break
        Specified by:
        newPageBreak in interface IRtfPageBreakContainer
        Throws:
        java.io.IOException - for I/O problems
      • newLineBreak

        public void newLineBreak()
                          throws java.io.IOException
        add a line break
        Specified by:
        newLineBreak in interface IRtfTextContainer
        Throws:
        java.io.IOException - for I/O problems
      • newPageNumber

        public RtfPageNumber newPageNumber()
                                    throws java.io.IOException
        Add a page number
        Specified by:
        newPageNumber in interface IRtfPageNumberContainer
        Returns:
        new RtfPageNumber object
        Throws:
        java.io.IOException - for I/O problems
      • newPageNumberCitation

        public RtfPageNumberCitation newPageNumberCitation​(java.lang.String id)
                                                    throws java.io.IOException
        Added by Boris POUDEROUS on 2002/07/09
        Specified by:
        newPageNumberCitation in interface IRtfPageNumberCitationContainer
        Parameters:
        id - string containing the citation text
        Returns:
        the new RtfPageNumberCitation object
        Throws:
        java.io.IOException - for I/O problems
      • newHyperLink

        public RtfHyperLink newHyperLink​(java.lang.String str,
                                         RtfAttributes attr)
                                  throws java.io.IOException
        Creates a new hyperlink.
        Specified by:
        newHyperLink in interface IRtfHyperLinkContainer
        Parameters:
        str - string containing the hyperlink text
        attr - attributes of new hyperlink
        Returns:
        the new RtfHyperLink object
        Throws:
        java.io.IOException - for I/O problems
      • newImage

        public RtfExternalGraphic newImage()
                                    throws java.io.IOException
        Start a new external graphic after closing all other elements
        Specified by:
        newImage in interface IRtfExternalGraphicContainer
        Returns:
        the new RtfExternalGraphic
        Throws:
        java.io.IOException - for I/O problems
      • okToWriteRtf

        protected boolean okToWriteRtf()
        Depending on RtfOptions, do not emit any RTF for empty paragraphs
        Overrides:
        okToWriteRtf in class RtfContainer
        Returns:
        true if RTF should be written
      • getTextAttributes

        public RtfAttributes getTextAttributes()
        accessor for text attributes
        Returns:
        attributes of the text