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 3580 2008-08-06 15:52:00Z howard_s $

Author: Mark Hall (Mark.Hall@mail.room3b.eu) 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 voidwriteFieldInstContent(OutputStream result)
Write the field instructions for this RtfAnchor.
protected voidwriteFieldResultContent(OutputStream result)
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 void writeFieldInstContent(OutputStream result)
Write the field instructions for this RtfAnchor. Sets the field type to HYPERLINK and then writes the url.

Parameters: result The OutputStream to write to.

Throws: IOException on i/o errors.

writeFieldResultContent

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

Parameters: result The OutputStream to write to.

Throws: IOException on i/o errors.