com.lowagie.text.rtf.field

Class RtfAnchor

public class RtfAnchor extends RtfField

The RtfAnchor is the RTF representation of an Anchor object.

Version: $Id: RtfAnchor.java 2784 2007-05-24 15:43:40Z hallm $

Author: Mark Hall (mhall@edu.uni-klu.ac.at) Werner Daehn (Werner.Daehn@BusinessObjects.com) Thomas Bickel (tmb99@inode.at)

Field Summary
RtfPhrasecontent
The RtfPhrase to display for the url
static byte[]HYPERLINK
Constant for a hyperlink
Stringurl
The url of this RtfAnchor
Constructor Summary
RtfAnchor(RtfDocument doc, Anchor anchor)
Constructs a RtfAnchor based on a RtfField
Method Summary
protected byte[]writeFieldInstContent()
Write the field instructions for this RtfAnchor.
protected voidwriteFieldInstContent(OutputStream result)
protected byte[]writeFieldResultContent()
Write the field result for this RtfAnchor.
protected voidwriteFieldResultContent(OutputStream out)
Write the field result for this RtfAnchor.

Field Detail

content

private RtfPhrase content
The RtfPhrase to display for the url

HYPERLINK

private static final byte[] HYPERLINK
Constant for a hyperlink

url

private String url
The url of this RtfAnchor

Constructor Detail

RtfAnchor

public RtfAnchor(RtfDocument doc, Anchor anchor)
Constructs a RtfAnchor based on a RtfField

Parameters: doc The RtfDocument this RtfAnchor belongs to anchor The Anchor this RtfAnchor is based on

Method Detail

writeFieldInstContent

protected byte[] writeFieldInstContent()

Deprecated: replaced by writeFieldInstContent

Write the field instructions for this RtfAnchor. Sets the field type to HYPERLINK and then writes the url.

Returns: The field instructions for this RtfAnchor

Throws: IOException

writeFieldInstContent

protected void writeFieldInstContent(OutputStream result)

writeFieldResultContent

protected byte[] writeFieldResultContent()

Deprecated: replaced by writeFieldResultContent

Write the field result for this RtfAnchor. Writes the content of the RtfPhrase.

Returns: The field result for this RtfAnchor

Throws: IOException

writeFieldResultContent

protected void writeFieldResultContent(OutputStream out)
Write the field result for this RtfAnchor. Writes the content of the RtfPhrase.