|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrefinery.report.targets.table.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.
Field Summary | |
static java.lang.String |
AUTHOR
Literal text for the 'author' property name. |
protected static java.lang.String |
CREATOR
A useful constant for specifying the creator constant. |
static java.lang.String |
TITLE
Literal text for the 'title' property name. |
Constructor Summary | |
TableProducer(boolean strictLayout)
Creates a new TableProducer. |
Method Summary | |
protected void |
addCell(TableCellData data)
Adds a new TableCellData to the grid. |
abstract void |
beginPage(java.lang.String name)
Handles the start of a new page. |
void |
clearCells()
Clears the grid, removes all created cells. |
abstract void |
close()
Closes the report and finishs the report writing. |
abstract void |
configure(java.util.Properties configuration)
Configures the table producer by reading the configuration settings from the given map. |
protected TableCellBackground |
createTableCellStyle(java.util.List background)
Merges all TableCellBackgrounds contained in the given list. |
abstract void |
endPage()
Handles the end of a page. |
int |
getCellCount()
Gets the number of created cells in the grid. |
abstract TableCellDataFactory |
getCellDataFactory()
Gets the TableProducer implementation of this TableProducer. |
java.lang.String |
getProperty(java.lang.String property)
Queries the property named with property . |
java.lang.String |
getProperty(java.lang.String property,
java.lang.String defaultValue)
Queries the property named with property . |
protected java.util.Iterator |
getPropertyNames()
Returns an enumeration of the property names. |
boolean |
isDummy()
Gets the dummy mode state, in dummy mode no output is done. |
abstract boolean |
isOpen()
Returns true, if the TableProducer is open. |
protected TableGridLayout |
layoutGrid()
Calculates the positions for the Excel cells. |
abstract void |
open()
Starts the report writing. |
void |
processBand(java.awt.geom.Rectangle2D bounds,
Band band)
Processes the layouted band. |
void |
setDummy(boolean dummy)
Defines the dummy mode. |
void |
setProperty(java.lang.String property,
java.lang.String value)
Defines a property for this output target. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String TITLE
public static final java.lang.String AUTHOR
protected static final java.lang.String CREATOR
Constructor Detail |
public TableProducer(boolean strictLayout)
strictLayout
- the strict layout flag. Set to true, to enable the strict
layout mode.Method Detail |
public abstract void open()
public abstract void close()
public abstract void endPage()
public abstract void beginPage(java.lang.String name)
name
- the page namepublic abstract TableCellDataFactory getCellDataFactory()
public void clearCells()
protected TableGridLayout layoutGrid()
public int getCellCount()
protected void addCell(TableCellData data)
data
- the new TableCellData.public abstract boolean isOpen()
public void processBand(java.awt.geom.Rectangle2D bounds, Band band)
bounds
- the bounds that define where to print the given band on this logical pageband
- the band that should be spooled/printedprotected TableCellBackground createTableCellStyle(java.util.List background)
background
- the collected backgrounds for a single table cell.
public boolean isDummy()
public void setDummy(boolean dummy)
dummy
- set to true, to activate the dummy mode, so that all output is skipped.public void setProperty(java.lang.String property, java.lang.String value)
property
- the name of the property to set (null
not permitted).value
- the value of the property. If the value is null
, the property is
removed from the output target.public java.lang.String getProperty(java.lang.String property)
property
. If the property is not found,
null
is returned.
property
- the name of the property to be queried
java.lang.NullPointerException
- if property
is nullpublic java.lang.String getProperty(java.lang.String property, java.lang.String defaultValue)
property
. If the property is not found, the
default value is returned.
property
- the name of the property to be querieddefaultValue
- the defaultvalue returned if there is no such property
java.lang.NullPointerException
- if property
is nullprotected java.util.Iterator getPropertyNames()
public abstract void configure(java.util.Properties configuration)
configuration
- the configuration supplied by the table processor.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |