ru.novosoft.dc.rtf.dom
Class RTFFlow

java.lang.Object
  |
  +--ru.novosoft.dc.rtf.dom.RTFFlow

public class RTFFlow
extends java.lang.Object

A flow is a sequential list of "block-like" objects, such as RTFParagraph and RTFTable.


Constructor Summary
RTFFlow()
           
 
Method Summary
 void addBlock(RTFBlock block)
          Append a new block-like object to the content.
 int blockCount()
          Return a number of block-like objects in this flow.
 java.util.List content()
          Return the flow content.
 org.w3c.dom.Element exportTo(org.w3c.dom.Element elem, java.lang.String tagName)
          Export the contents of this object to the specified DOM element creating a child with the specified tagName and returning it.
 void mergeWith(RTFFlow flow)
          Add elements of the specified flow to the end of this flow.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTFFlow

public RTFFlow()
Method Detail

blockCount

public final int blockCount()
Return a number of block-like objects in this flow.

addBlock

public final void addBlock(RTFBlock block)
Append a new block-like object to the content.

content

public final java.util.List content()
Return the flow content.

mergeWith

public void mergeWith(RTFFlow flow)
Add elements of the specified flow to the end of this flow. If the last block of this flow ends with the END_SECTION object, this object is replaced to the END_PAR object before merge. But if the last block of this flow contains an only END_SECTION object, this block is removed before merge. The method is used in section optimization procedure when near sections should be merged together.

exportTo

public org.w3c.dom.Element exportTo(org.w3c.dom.Element elem,
                                    java.lang.String tagName)
Export the contents of this object to the specified DOM element creating a child with the specified tagName and returning it.