com.lowagie.text.rtf.field

Class RtfAnchor

public class RtfAnchor extends RtfField

Version: $Version:$

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

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 byte[]writeFieldResultContent()
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()
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

writeFieldResultContent

protected byte[] writeFieldResultContent()
Write the field result for this RtfAnchor. Writes the content of the RtfPhrase.

Returns: The field result for this RtfAnchor

Throws: IOException