org.jfor.jfor.rtflib.rtfdoc
Class RtfHyperLink
java.lang.Object
org.jfor.jfor.rtflib.rtfdoc.RtfElement
org.jfor.jfor.rtflib.rtfdoc.RtfContainer
org.jfor.jfor.rtflib.rtfdoc.RtfHyperLink
- All Implemented Interfaces:
- IRtfTextContainer
- public class RtfHyperLink
- extends RtfContainer
- implements IRtfTextContainer
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.jfor.jfor.rtflib.rtfdoc.RtfContainer |
addChild, containsText, dump, getChildCount, getChildren, getOptions, okToWriteRtf, setChildren, setOptions, toString, writeRtfContent |
Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement |
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, 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:
writer
- a Writer
value
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
- Throws:
java.io.IOException
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
- Throws:
java.io.IOException
getTextContainerAttributes
public RtfAttributes getTextContainerAttributes()
- IRtfTextContainer requirement: return a copy of our attributes
- Specified by:
getTextContainerAttributes
in interface IRtfTextContainer
newLineBreak
public void newLineBreak()
throws java.io.IOException
- add a line break
- Specified by:
newLineBreak
in interface IRtfTextContainer
- Throws:
java.io.IOException
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()
- Description copied from class:
RtfContainer
- true if this element would generate no "useful" RTF content.
For an RtfContainer, true if it has no children where isEmpty() is false
- Overrides:
isEmpty
in class RtfContainer