org.jfor.jfor.rtflib.rtfdoc
Class RtfBookmark

java.lang.Object
  extended byorg.jfor.jfor.rtflib.rtfdoc.RtfElement
      extended byorg.jfor.jfor.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.

Author:
Andreas Putz

Field Summary
static int maxBookmarkLength
          Word 2000 supports a length of 40 characters only
static char replaceCharacter
          Word 2000 converts '.' in bookmarks to "_", thats why we control this replacement.
 
Fields inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
m_attrib, m_parent, m_writer
 
Constructor Summary
(package private) RtfBookmark(IRtfBookmarkContainer parent, java.io.Writer w, java.lang.String bookmark)
          Constructor.
 
Method Summary
 boolean isEmpty()
          true if this element would generate no "useful" RTF content
 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.jfor.jfor.rtflib.rtfdoc.RtfElement
close, dump, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, okToWriteRtf, toString, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeStarControlWord, writeStarControlWordNS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

maxBookmarkLength

public static int maxBookmarkLength
Word 2000 supports a length of 40 characters only


replaceCharacter

public static char replaceCharacter
Word 2000 converts '.' in bookmarks to "_", thats why we control this replacement.

Constructor Detail

RtfBookmark

RtfBookmark(IRtfBookmarkContainer parent,
            java.io.Writer w,
            java.lang.String bookmark)
      throws java.io.IOException
Constructor.

Parameters:
parent - a RtfBookmarkContainer value
bookmark - Name of the bookmark
Method Detail

writeRtfPrefix

public void writeRtfPrefix()
                    throws java.io.IOException
Is called before writing the Rtf content.

Overrides:
writeRtfPrefix in class RtfElement
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 class RtfElement
Throws:
java.io.IOException - On error

writeRtfSuffix

public void writeRtfSuffix()
                    throws java.io.IOException
Is called after writing the Rtf content.

Overrides:
writeRtfSuffix in class RtfElement
Throws:
java.io.IOException - On Error

isEmpty

public boolean isEmpty()
true if this element would generate no "useful" RTF content

Specified by:
isEmpty in class RtfElement