public class RtfHyperLink extends RtfContainer implements IRtfTextContainer
| Modifier and Type | Field and Description |
|---|---|
protected RtfText |
mText
RtfText
|
protected java.lang.String |
url
The url of the image
|
m_attrib, m_parent, m_writer| Constructor and Description |
|---|
RtfHyperLink(IRtfTextContainer parent,
java.io.Writer writer,
java.lang.String str,
RtfAttributes attr)
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
RtfAttributes |
getTextContainerAttributes()
IRtfTextContainer requirement: return a copy of our attributes
|
boolean |
isEmpty()
true if this element would generate no "useful" RTF content.
|
void |
newLineBreak()
add a line break
|
RtfText |
newText(java.lang.String str)
close current text run if any and start a new one with default attributes
|
RtfText |
newText(java.lang.String str,
RtfAttributes attr)
close current text run if any and start a new one
|
void |
setExternalURL(java.lang.String url)
Sets the url of the external link.
|
void |
setInternalURL(java.lang.String jumpTo)
Sets the url of the external link.
|
void |
writeRtfPrefix()
Writes the RTF content to m_writer.
|
void |
writeRtfSuffix()
Writes the RTF content to m_writer.
|
addChild, containsText, dump, getChildCount, getChildren, getOptions, okToWriteRtf, setChildren, setOptions, toString, writeRtfContentclose, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNSprotected java.lang.String url
protected RtfText mText
public RtfHyperLink(IRtfTextContainer parent, java.io.Writer writer, java.lang.String str, RtfAttributes attr) throws java.io.IOException
container - a RtfContainer valuewriter - a Writer valueattributes - a RtfAttributes valuejava.io.IOExceptionpublic void writeRtfPrefix()
throws java.io.IOException
writeRtfPrefix in class RtfElementjava.io.IOException - On errorpublic void writeRtfSuffix()
throws java.io.IOException
writeRtfSuffix in class RtfElementjava.io.IOException - On errorpublic RtfText newText(java.lang.String str) throws java.io.IOException
newText in interface IRtfTextContainerstr - if not null, added to the RtfText createdjava.io.IOExceptionpublic RtfText newText(java.lang.String str, RtfAttributes attr) throws java.io.IOException
newText in interface IRtfTextContainerstr - if not null, added to the RtfText createdjava.io.IOExceptionpublic RtfAttributes getTextContainerAttributes()
getTextContainerAttributes in interface IRtfTextContainerpublic void newLineBreak()
throws java.io.IOException
newLineBreak in interface IRtfTextContainerjava.io.IOExceptionpublic void setExternalURL(java.lang.String url)
url - Link url like "http://..."public void setInternalURL(java.lang.String jumpTo)
jumpTo - Name of the text markpublic boolean isEmpty()
RtfContainerisEmpty in class RtfContainer