public class RtfParagraph extends RtfBookmarkContainerImpl implements IRtfTextContainer, IRtfPageBreakContainer, IRtfHyperLinkContainer, IRtfExternalGraphicContainer, IRtfPageNumberContainer, IRtfPageNumberCitationContainer
mBookmarkm_attrib, m_parent, m_writer| Constructor and Description |
|---|
RtfParagraph(IRtfParagraphContainer parent,
java.io.Writer w)
Create an RTF paragraph as a child of given container with default attributes
|
RtfParagraph(IRtfParagraphContainer parent,
java.io.Writer w,
RtfAttributes attr)
Create an RTF paragraph as a child of given container with given attributes
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getText() |
RtfAttributes |
getTextAttributes()
get the attributes of our text
|
RtfAttributes |
getTextContainerAttributes()
IRtfTextContainer requirement: return a copy of our attributes
|
RtfHyperLink |
newHyperLink(java.lang.String str,
RtfAttributes attr)
Creates a new hyperlink.
|
RtfExternalGraphic |
newImage()
start a new external graphic after closing all other elements
|
void |
newLineBreak()
add a line break
|
void |
newPageBreak()
add a page break
|
RtfPageNumber |
newPageNumber() |
RtfPageNumberCitation |
newPageNumberCitation(java.lang.String id)
Added by Boris POUDEROUS on 2002/07/09
|
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
|
protected boolean |
okToWriteRtf()
depending on RtfOptions, do not emit any RTF for empty paragraphs
|
void |
setKeepn()
Set the keepn attribute for this paragraph
|
void |
setResetProperties()
Force reset properties
|
protected void |
writeRtfPrefix()
overridden to write our attributes before our content
|
protected void |
writeRtfSuffix()
overridden to close paragraph
|
newBookmarkaddChild, containsText, dump, getChildCount, getChildren, getOptions, isEmpty, setChildren, setOptions, toString, writeRtfContentclose, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNSRtfParagraph(IRtfParagraphContainer parent, java.io.Writer w) throws java.io.IOException
java.io.IOExceptionRtfParagraph(IRtfParagraphContainer parent, java.io.Writer w, RtfAttributes attr) throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getText()
public void setKeepn()
public void setResetProperties()
public RtfAttributes getTextContainerAttributes()
getTextContainerAttributes in interface IRtfTextContainerprotected void writeRtfPrefix()
throws java.io.IOException
writeRtfPrefix in class RtfElementjava.io.IOExceptionprotected void writeRtfSuffix()
throws java.io.IOException
writeRtfSuffix in class RtfElementjava.io.IOExceptionpublic 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 void newPageBreak()
throws java.io.IOException
newPageBreak in interface IRtfPageBreakContainerjava.io.IOExceptionpublic void newLineBreak()
throws java.io.IOException
newLineBreak in interface IRtfTextContainerjava.io.IOExceptionpublic RtfPageNumber newPageNumber() throws java.io.IOException
newPageNumber in interface IRtfPageNumberContainerjava.io.IOExceptionpublic RtfPageNumberCitation newPageNumberCitation(java.lang.String id) throws java.io.IOException
newPageNumberCitation in interface IRtfPageNumberCitationContainerjava.io.IOExceptionpublic RtfHyperLink newHyperLink(java.lang.String str, RtfAttributes attr) throws java.io.IOException
newHyperLink in interface IRtfHyperLinkContainerjava.io.IOException - on errorpublic RtfExternalGraphic newImage() throws java.io.IOException
newImage in interface IRtfExternalGraphicContainerjava.io.IOException - On errorprotected boolean okToWriteRtf()
okToWriteRtf in class RtfContainerpublic RtfAttributes getTextAttributes()