Class RtfHyperLink

    • Field Detail

      • url

        protected java.lang.String url
        The url of the image
      • mText

        protected RtfText mText
        RtfText
    • Constructor Detail

      • RtfHyperLink

        public RtfHyperLink​(IRtfTextContainer parent,
                            java.io.Writer writer,
                            java.lang.String str,
                            RtfAttributes attr)
                     throws java.io.IOException
        A constructor.
        Parameters:
        parent - a RtfContainer value
        writer - a Writer value
        str - text of the link
        attr - a RtfAttributes value
        Throws:
        java.io.IOException - for I/O problems
      • RtfHyperLink

        public RtfHyperLink​(RtfTextrun parent,
                            java.io.Writer writer,
                            RtfAttributes attr)
                     throws java.io.IOException
        A constructor.
        Parameters:
        parent - a RtfContainer value
        writer - a Writer value
        attr - a RtfAttributes value
        Throws:
        java.io.IOException - for I/O problems
    • Method Detail

      • writeRtfPrefix

        public void writeRtfPrefix()
                            throws java.io.IOException
        Writes the RTF content to m_writer.
        Overrides:
        writeRtfPrefix in class RtfElement
        Throws:
        java.io.IOException - On error
      • writeRtfSuffix

        public void writeRtfSuffix()
                            throws java.io.IOException
        Writes the RTF content to m_writer.
        Overrides:
        writeRtfSuffix in class RtfElement
        Throws:
        java.io.IOException - On error
      • 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:
        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 text to add
        Returns:
        the new RtfText object
        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
      • setExternalURL

        public void setExternalURL​(java.lang.String url)
        Sets the url of the external link.
        Parameters:
        url - Link url like "http://..."
      • setInternalURL

        public void setInternalURL​(java.lang.String jumpTo)
        Sets the url of the external link.
        Parameters:
        jumpTo - Name of the text mark
      • isEmpty

        public boolean isEmpty()
        Overrides:
        isEmpty in class RtfContainer
        Returns:
        false (always)
      • 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:
        a text run
        Throws:
        java.io.IOException - if not caught