public class RtfTextrun extends RtfContainer
attrib, parent, writer
Modifier and Type | Method and Description |
---|---|
void |
addBookmark(java.lang.String id)
Inserts a bookmark.
|
RtfFootnote |
addFootnote()
Inserts a footnote.
|
RtfHyperLink |
addHyperlink(RtfAttributes attr)
Inserts a hyperlink.
|
void |
addLeader(RtfAttributes attrs)
Inserts a leader.
|
void |
addPageNumber(RtfAttributes attr)
Inserts a page number.
|
void |
addPageNumberCitation(java.lang.String refId)
Inserts a page number citation.
|
void |
addParagraphBreak()
Inserts paragraph break before all close group marks.
|
void |
addString(java.lang.String s)
Add string to children list.
|
RtfListItem |
getRtfListItem()
Gets the parent list-item of the textrun.
|
static RtfTextrun |
getTextrun(RtfContainer container,
java.io.Writer writer,
RtfAttributes attrs)
Adds a new RtfTextrun to the given container if necessary, and returns it.
|
RtfExternalGraphic |
newImage()
Inserts an image.
|
void |
popBlockAttributes()
Pops block attributes, notifies all opened blocks about pushing block
attributes, adds
CloseGroupMark as a child. |
void |
popInlineAttributes()
Pop inline attributes.
|
void |
pushBlockAttributes(RtfAttributes attrs)
Pushes block attributes, notifies all opened blocks about pushing block
attributes, adds
OpenGroupMark as a child. |
void |
pushInlineAttributes(RtfAttributes attrs)
Pushes inline attributes.
|
void |
setRtfListItem(RtfListItem listItem)
Set the parent list-item of the textrun.
|
void |
setSuppressLastPar(boolean bSuppress)
specify, if the last paragraph control word (\par) should be suppressed.
|
protected void |
writeRtfContent()
write RTF code of all our children
|
addChild, getChildCount, getChildren, isEmpty, okToWriteRtf, setChildren, setOptions, toString
close, getRtfAttributes, newLine, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeRtfPrefix, writeRtfSuffix, writeStarControlWord, writeStarControlWordNS
public void pushBlockAttributes(RtfAttributes attrs) throws java.io.IOException
OpenGroupMark
as a child.attrs
- the block attributes to pushjava.io.IOException
- for I/O problemspublic void popBlockAttributes() throws java.io.IOException
CloseGroupMark
as a child.java.io.IOException
- for I/O problemspublic void pushInlineAttributes(RtfAttributes attrs) throws java.io.IOException
attrs
- the inline attributes to pushjava.io.IOException
- for I/O problemspublic void addPageNumberCitation(java.lang.String refId) throws java.io.IOException
refId
- the identifier being referencedjava.io.IOException
- for I/O problemspublic void popInlineAttributes() throws java.io.IOException
java.io.IOException
- for I/O problemspublic void addString(java.lang.String s) throws java.io.IOException
s
- string to addjava.io.IOException
- for I/O problemspublic RtfFootnote addFootnote() throws java.io.IOException
java.io.IOException
- for I/O problemspublic void addParagraphBreak() throws java.io.IOException
java.io.IOException
- for I/O problemspublic void addLeader(RtfAttributes attrs) throws java.io.IOException
attrs
- Attributes for the leaderjava.io.IOException
- for I/O problemspublic void addPageNumber(RtfAttributes attr) throws java.io.IOException
attr
- Attributes for the page number to insert.java.io.IOException
- for I/O problemspublic RtfHyperLink addHyperlink(RtfAttributes attr) throws java.io.IOException
attr
- Attributes for the hyperlink to insert.java.io.IOException
- for I/O problemspublic void addBookmark(java.lang.String id) throws java.io.IOException
id
- Id for the inserted bookmarkjava.io.IOException
- for I/O problemspublic RtfExternalGraphic newImage() throws java.io.IOException
java.io.IOException
- for I/O problemspublic static RtfTextrun getTextrun(RtfContainer container, java.io.Writer writer, RtfAttributes attrs) throws java.io.IOException
container
- RtfContainer, which is the parent of the returned RtfTextrunwriter
- Writer of the given RtfContainerattrs
- RtfAttributes which are to write at the beginning of the RtfTextrunjava.io.IOException
- for I/O problemspublic void setSuppressLastPar(boolean bSuppress)
bSuppress
- true, if the last \par should be suppressedprotected void writeRtfContent() throws java.io.IOException
writeRtfContent
in class RtfContainer
java.io.IOException
- for I/O problemspublic void setRtfListItem(RtfListItem listItem)
listItem
- parent list-item of the textrunpublic RtfListItem getRtfListItem()
Copyright 1999-2010 The Apache Software Foundation. All Rights Reserved.