com.jrefinery.report.targets.table.csv
Class CSVTableProducer

java.lang.Object
  |
  +--com.jrefinery.report.targets.table.TableProducer
        |
        +--com.jrefinery.report.targets.table.csv.CSVTableProducer

public class CSVTableProducer
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.

This class defines the global contract and provides some helper methods for the implementors.

Author:
Thomas Morgner.

Field Summary
 
Fields inherited from class com.jrefinery.report.targets.table.TableProducer
AUTHOR, CREATOR, TITLE
 
Constructor Summary
CSVTableProducer(java.io.PrintWriter writer, boolean strict)
          Creates a new CSVTableProducer, using the given writer, strict mode and separator.
 
Method Summary
 void beginPage(java.lang.String name)
          Pages are not supported by this implementation.
 void close()
          Handles the closing of the producer.
 void configure(java.util.Properties configuration)
          Configures the table producer by reading the configuration settings from the given map.
 void endPage()
          Ends the page and layouts the generated grid.
 TableCellDataFactory getCellDataFactory()
          Gets the CSVTableProducer's table cell data factory.
 boolean isOpen()
          Returns true, if the TableProducer is open.
 void open()
          Handles the opening of the producer.
 
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

CSVTableProducer

public CSVTableProducer(java.io.PrintWriter writer,
                        boolean strict)
Creates a new CSVTableProducer, using the given writer, strict mode and separator.

Parameters:
writer - the character stream writer for writing the generated content.
strict - the strict mode that is used for the layouting.
Method Detail

open

public void open()
Handles the opening of the producer. Only maintains the open state.

Specified by:
open in class TableProducer

close

public void close()
Handles the closing of the producer. Only maintains the open state.

Specified by:
close in class TableProducer

endPage

public void endPage()
Ends the page and layouts the generated grid. After the grid is written, the collected cells are removed from the TableGrid.

Specified by:
endPage in class TableProducer

beginPage

public void beginPage(java.lang.String name)
Pages are not supported by this implementation.

Specified by:
beginPage in class TableProducer
Parameters:
name - the name of the page, not used.

getCellDataFactory

public TableCellDataFactory getCellDataFactory()
Gets the CSVTableProducer's table cell data factory.

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.