public class RtfHyperLink extends RtfContainer implements IRtfTextContainer, IRtfTextrunContainer
| Modifier and Type | Field and Description |
|---|---|
protected RtfText |
mText
RtfText
|
protected String |
url
The url of the image
|
attrib, parent, writer| Constructor and Description |
|---|
RtfHyperLink(IRtfTextContainer parent,
Writer writer,
String str,
RtfAttributes attr)
A constructor.
|
RtfHyperLink(RtfTextrun parent,
Writer writer,
RtfAttributes attr)
A constructor.
|
| Modifier and Type | Method and Description |
|---|---|
RtfAttributes |
getTextContainerAttributes()
IRtfTextContainer requirement:
|
RtfTextrun |
getTextrun()
Returns the current RtfTextrun object.
|
boolean |
isEmpty() |
void |
newLineBreak()
add a line break
|
RtfText |
newText(String str)
close current text run if any and start a new one with default attributes
|
RtfText |
newText(String str,
RtfAttributes attr)
close current text run if any and start a new one
|
void |
setExternalURL(String url)
Sets the url of the external link.
|
void |
setInternalURL(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, findChildren, getChildCount, getChildren, okToWriteRtf, setChildren, setOptions, toString, writeRtfContentclose, getParentOfClass, getRtfAttributes, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNSpublic RtfHyperLink(IRtfTextContainer parent, Writer writer, String str, RtfAttributes attr) throws IOException
parent - a RtfContainer valuewriter - a Writer valuestr - text of the linkattr - a RtfAttributes valueIOException - for I/O problemspublic RtfHyperLink(RtfTextrun parent, Writer writer, RtfAttributes attr) throws IOException
parent - a RtfContainer valuewriter - a Writer valueattr - a RtfAttributes valueIOException - for I/O problemspublic void writeRtfPrefix()
throws IOException
writeRtfPrefix in class RtfElementIOException - On errorpublic void writeRtfSuffix()
throws IOException
writeRtfSuffix in class RtfElementIOException - On errorpublic RtfText newText(String str) throws IOException
newText in interface IRtfTextContainerstr - if not null, added to the RtfText createdIOException - for I/O problemspublic RtfText newText(String str, RtfAttributes attr) throws IOException
newText in interface IRtfTextContainerstr - if not null, added to the RtfText createdattr - attributes of text to addIOException - for I/O problemspublic RtfAttributes getTextContainerAttributes() throws FOPException
getTextContainerAttributes in interface IRtfTextContainerFOPException - if attributes cannot be clonedpublic void newLineBreak()
throws IOException
newLineBreak in interface IRtfTextContainerIOException - for I/O problemspublic void setExternalURL(String url)
url - Link url like "http://..."public void setInternalURL(String jumpTo)
jumpTo - Name of the text markpublic boolean isEmpty()
isEmpty in class RtfContainerpublic RtfTextrun getTextrun() throws IOException
IRtfTextrunContainergetTextrun in interface IRtfTextrunContainerIOException - if not caughtCopyright © 2023 Apache Software Foundation. All rights reserved.