com.jrefinery.report.targets.table.rtf
Class RTFProducer

java.lang.Object
  extended bycom.jrefinery.report.targets.table.TableProducer
      extended bycom.jrefinery.report.targets.table.rtf.RTFProducer

public class RTFProducer
extends TableProducer

The TableProducer is responsible for creating the produced Table. After the writer has finished the band layout process, the layouted bands are forwarded into the TableProducer. The TableProducer coordinates the cell creation process and collects the generated TableCellData. The raw CellData objects are later transformed into a TableGridLayout. todo There is a memory leak when using iText fonts with that output target ... todo seems to be the same issue as with the PDF fonts a long time ago.

Author:
Thomas Morgner

Field Summary
 
Fields inherited from class com.jrefinery.report.targets.table.TableProducer
AUTHOR, CREATOR, TITLE
 
Constructor Summary
RTFProducer(java.io.OutputStream outputStream, boolean strictLayout)
          Creates a new RTFProducer.
 
Method Summary
 void beginPage(java.lang.String name)
          Handles the start of a new page.
 void close()
          Closes the report and finishs the report writing.
 void configure(java.util.Properties configuration)
          Configures the table producer by reading the configuration settings from the given map.
 void endPage()
          Handles the end of a page and performs the table layout for the current table.
 TableCellDataFactory getCellDataFactory()
          Gets the TableProducer implementation of this TableProducer.
 boolean isOpen()
          Returns true, if the TableProducer is open.
 void open()
          Starts the report writing and opens the RTF document for writing.
 
Methods inherited from class com.jrefinery.report.targets.table.TableProducer
addCell, clearCells, createTableCellStyle, getCellCount, getProperty, getProperty, getPropertyNames, isDummy, layoutGrid, processBand, setDummy, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RTFProducer

public RTFProducer(java.io.OutputStream outputStream,
                   boolean strictLayout)
Creates a new RTFProducer.

Parameters:
outputStream - the target output stream
strictLayout - the stric layout flag.
Throws:
java.lang.NullPointerException - if the outputstream is null.
Method Detail

open

public void open()
Starts the report writing and opens the RTF document for writing.

Specified by:
open in class TableProducer

close

public void close()
Closes the report and finishs the report writing. Closes the RTF document.

Specified by:
close in class TableProducer

endPage

public void endPage()
Handles the end of a page and performs the table layout for the current table.

Specified by:
endPage in class TableProducer

beginPage

public void beginPage(java.lang.String name)
Handles the start of a new page. The page name is given as parameter. The TableWriter starts a new page whenever a manual pagebreak is found in the report definition. The ReportProducer has been opened before.

Specified by:
beginPage in class TableProducer
Parameters:
name - the page name

getCellDataFactory

public TableCellDataFactory getCellDataFactory()
Gets the TableProducer implementation of this TableProducer.

Specified by:
getCellDataFactory in class TableProducer
Returns:
the TableProducers TableCellDataFactory, which is used to create the TableCellData.

isOpen

public boolean isOpen()
Returns true, if the TableProducer is open. Only open producers are able to write TableCells or to create TableCellData from Elements.

Specified by:
isOpen in class TableProducer
Returns:
checks, whether the TableProducer is open.

configure

public void configure(java.util.Properties configuration)
Configures the table producer by reading the configuration settings from the given map.

Specified by:
configure in class TableProducer
Parameters:
configuration - the configuration supplied by the table processor.