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.
- Author:
- Andreas Putz
{\field {\*\fldinst HYPERLINK "http://www.test.de" }{\fldrslt Joe Smith}}
Field Summary |
protected RtfText |
mText
RtfText |
protected java.lang.String |
url
The url of the image |
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement |
close, 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 |
url
protected java.lang.String url
- The url of the image
mText
protected RtfText mText
- RtfText
RtfHyperLink
public RtfHyperLink(IRtfTextContainer parent,
java.io.Writer writer,
java.lang.String str,
RtfAttributes attr)
throws java.io.IOException
- Default constructor.
- Parameters:
parent
- a RtfContainer
valuewriter
- a Writer
valuestr
- text of the linkattr
- 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
- Throws:
java.io.IOException
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 createdattr
- attributes of text to add
- Returns:
- the new RtfText object
- Throws:
java.io.IOException
- for I/O problems
getTextContainerAttributes
public RtfAttributes getTextContainerAttributes()
- IRtfTextContainer requirement:
- Specified by:
getTextContainerAttributes
in interface IRtfTextContainer
- Returns:
- a copy of our attributes
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:
- The RtfTextrun object
- Throws:
java.io.IOException
- Thrown when an IO-problem occurs
Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.