Class RtfBookmark
- java.lang.Object
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
-
- org.apache.fop.render.rtf.rtflib.rtfdoc.RtfBookmark
-
public class RtfBookmark extends RtfElement
RTF Bookmark. Create an RTF bookmark as a child of given container with default attributes. This class belongs to the "id" attribute processing.
This work was authored by Andreas Putz (a.putz@skynamics.com).
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
bookmark
Name of the bokkmarkstatic int
MAX_BOOKMARK_LENGTH
Word 2000 supports a length of 40 characters onlystatic char
REPLACE_CHARACTER
Word 2000 converts '.' in bookmarks to "_", thats why we control this replacement.-
Fields inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
attrib, parent, writer
-
-
Constructor Summary
Constructors Constructor Description RtfBookmark(RtfContainer parent, java.io.Writer writer, java.lang.String bookmark)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
endBookmark()
Writes RTF content to close the bookmark.boolean
isEmpty()
private void
startBookmark()
Writes RTF content to begin the bookmark.private void
writeRtfBookmark(java.lang.String tag)
Writes the rtf bookmark.void
writeRtfContent()
Writes the RTF content to m_writer.void
writeRtfPrefix()
Is called before writing the Rtf content.void
writeRtfSuffix()
Is called after writing the Rtf content.-
Methods inherited from class org.apache.fop.render.rtf.rtflib.rtfdoc.RtfElement
close, dump, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, newLine, okToWriteRtf, toString, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
-
-
-
-
Field Detail
-
bookmark
private java.lang.String bookmark
Name of the bokkmark
-
MAX_BOOKMARK_LENGTH
public static final int MAX_BOOKMARK_LENGTH
Word 2000 supports a length of 40 characters only- See Also:
- Constant Field Values
-
REPLACE_CHARACTER
public static final char REPLACE_CHARACTER
Word 2000 converts '.' in bookmarks to "_", thats why we control this replacement.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
RtfBookmark
RtfBookmark(RtfContainer parent, java.io.Writer writer, java.lang.String bookmark) throws java.io.IOException
Constructor.- Parameters:
parent
- aRtfBookmarkContainer
valuewriter
- aWriter
valuebookmark
- Name of the bookmark- Throws:
java.io.IOException
-
-
Method Detail
-
writeRtfPrefix
public void writeRtfPrefix() throws java.io.IOException
Is called before writing the Rtf content.- Overrides:
writeRtfPrefix
in classRtfElement
- Throws:
java.io.IOException
- On Error
-
writeRtfContent
public void writeRtfContent() throws java.io.IOException
Writes the RTF content to m_writer.- Specified by:
writeRtfContent
in classRtfElement
- Throws:
java.io.IOException
- On error
-
writeRtfSuffix
public void writeRtfSuffix() throws java.io.IOException
Is called after writing the Rtf content.- Overrides:
writeRtfSuffix
in classRtfElement
- Throws:
java.io.IOException
- On Error
-
startBookmark
private void startBookmark() throws java.io.IOException
Writes RTF content to begin the bookmark.- Throws:
java.io.IOException
- On error
-
endBookmark
private void endBookmark() throws java.io.IOException
Writes RTF content to close the bookmark.- Throws:
java.io.IOException
- On error
-
writeRtfBookmark
private void writeRtfBookmark(java.lang.String tag) throws java.io.IOException
Writes the rtf bookmark.- Parameters:
tag
- Begin or close tag- Throws:
java.io.IOException
- On error
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in classRtfElement
- Returns:
- true if this element would generate no "useful" RTF content
-
-