Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.fop.render.rtf.rtflib.rtfdoc
Class RtfHyperLink

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

All Implemented Interfaces:
  IRtfTextContainer, IRtfTextrunContainer

    public class RtfHyperLink

extends RtfContainer
implements IRtfTextContainer, IRtfTextrunContainer

Creates an hyperlink. This class belongs to the tag processing.

This work was authored by Andreas Putz (a.putz@skynamics.com).

Field Summary
`protected RtfText` | `mText` RtfText
`protected java.lang.String` | `url` The url of the image

Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
`attrib, parent, writer`

Constructor Summary
`RtfHyperLink(IRtfTextContainer parent, java.io.Writer writer, java.lang.String str, RtfAttributes attr)` A constructor.
`RtfHyperLink(RtfTextrun parent, java.io.Writer writer, RtfAttributes attr)` A constructor.

Method Summary
`RtfAttributes` | `getTextContainerAttributes()` IRtfTextContainer requirement:
`RtfTextrun` | `getTextrun()` Returns the current RtfTextrun object.
`boolean` | `isEmpty()`
`void` | `newLineBreak()` add a line break
`RtfText` | `newText(java.lang.String str)` close current text run if any and start a new one with default attributes
`RtfText` | `newText(java.lang.String str, RtfAttributes attr)` close current text run if any and start a new one
`void` | `setExternalURL(java.lang.String url)` Sets the url of the external link.
`void` | `setInternalURL(java.lang.String jumpTo)` Sets the url of the external link.
`void` | `writeRtfPrefix()` Writes the RTF content to m_writer.
`void` | `writeRtfSuffix()` Writes the RTF content to m_writer.

Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfContainer
`addChild, findChildren, getChildCount, getChildren, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent`

Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
`close, getParentOfClass, getRtfAttributes, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

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

### getTextContainerAttributes

    public RtfAttributes getTextContainerAttributes()
                                             throws FOPException

  IRtfTextContainer requirement:

  Specified by:
    `getTextContainerAttributes` in interface `IRtfTextContainer`
  Returns:
    a copy of our attributes
  Throws:
    `FOPException` - if attributes cannot be cloned

### 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| fop 2.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright 1999-2017 The Apache Software Foundation. All Rights Reserved.