org.jfor.jfor.rtflib.rtfdoc
Class RtfPage

java.lang.Object
  extended by org.jfor.jfor.rtflib.rtfdoc.RtfElement
      extended by org.jfor.jfor.rtflib.rtfdoc.RtfContainer
          extended by org.jfor.jfor.rtflib.rtfdoc.RtfPage

public class RtfPage
extends RtfContainer

Specifies rtf control words. Is the container for page attributes. Overrides okToWriteRtf.

Author:
Christopher Scott, scottc@westinghouse.com

Field Summary
static java.lang.String MARGIN_BOTTOM
           
static java.lang.String MARGIN_LEFT
           
static java.lang.String MARGIN_RIGHT
           
static java.lang.String MARGIN_TOP
           
static java.lang.String[] PAGE_ATTR
           
static java.lang.String PAGE_HEIGHT
           
static java.lang.String PAGE_WIDTH
          RtfPage attributes
 
Fields inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
m_parent, m_writer
 
Constructor Summary
RtfPage(RtfPageArea parent, java.io.Writer w, RtfAttributes attrs)
          RtfPage creates new page attributes with the parent container, the writer and the attributes
 
Method Summary
 RtfAttributes getAttributes()
          RtfPage - attributes accessor
protected  boolean okToWriteRtf()
          RtfPage - is overwritten here because page attributes have no content only attributes.
protected  void writeRtfContent()
          RtfPage writes the attributes the attributes contained in the string PAGE_ATTR, if not null
 
Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfContainer
addChild, containsText, dump, getChildCount, getChildren, getOptions, isEmpty, setChildren, setOptions, toString
 
Methods inherited from class org.jfor.jfor.rtflib.rtfdoc.RtfElement
close, getParentOfClass, getRtfAttributes, getRtfFile, isClosed, writeAttributes, writeControlWord, writeControlWordNS, writeExceptionInRtf, writeGroupMark, writeOneAttribute, writeOneAttributeNS, writeRtf, writeRtfPrefix, writeRtfSuffix, writeStarControlWord, writeStarControlWordNS
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

PAGE_WIDTH

public static final java.lang.String PAGE_WIDTH
RtfPage attributes

See Also:
Constant Field Values

PAGE_HEIGHT

public static final java.lang.String PAGE_HEIGHT
See Also:
Constant Field Values

MARGIN_TOP

public static final java.lang.String MARGIN_TOP
See Also:
Constant Field Values

MARGIN_BOTTOM

public static final java.lang.String MARGIN_BOTTOM
See Also:
Constant Field Values

MARGIN_LEFT

public static final java.lang.String MARGIN_LEFT
See Also:
Constant Field Values

MARGIN_RIGHT

public static final java.lang.String MARGIN_RIGHT
See Also:
Constant Field Values

PAGE_ATTR

public static final java.lang.String[] PAGE_ATTR
Constructor Detail

RtfPage

RtfPage(RtfPageArea parent,
        java.io.Writer w,
        RtfAttributes attrs)
  throws java.io.IOException
RtfPage creates new page attributes with the parent container, the writer and the attributes

Throws:
java.io.IOException
Method Detail

writeRtfContent

protected void writeRtfContent()
                        throws java.io.IOException
RtfPage writes the attributes the attributes contained in the string PAGE_ATTR, if not null

Overrides:
writeRtfContent in class RtfContainer
Throws:
java.io.IOException

getAttributes

public RtfAttributes getAttributes()
RtfPage - attributes accessor


okToWriteRtf

protected boolean okToWriteRtf()
RtfPage - is overwritten here because page attributes have no content only attributes. RtfContainer is defined not to write when empty. Therefore must make this true to print.

Overrides:
okToWriteRtf in class RtfContainer