|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jrefinery.report.targets.table.AbstractTableCellDataFactory
com.jrefinery.report.targets.table.excel.ExcelCellDataFactory
The cell data factory is responsible for converting elements into excel cell data. The element style is converted using an external style factory. This factory reuses previously defined styles if possible, to increase the file creating efficiency.
Constructor Summary | |
ExcelCellDataFactory(ExcelCellStyleFactory styleFactory)
Creates a new ExcelCellDataFactory. |
Method Summary | |
TableCellData |
createCellData(Element element,
java.awt.geom.Rectangle2D bounds)
Creates the TableCellData for the given Element. |
ExcelCellStyleFactory |
getStyleFactory()
Gets the style factory, which should be used in this factory. |
boolean |
isDefineDataFormats()
Defines whether to map java objects into excel extended cell formats. |
void |
setDefineDataFormats(boolean defineDataFormats)
Defines whether to map java objects into excel extended cell formats. |
Methods inherited from class com.jrefinery.report.targets.table.AbstractTableCellDataFactory |
createBackground, createBandCell |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ExcelCellDataFactory(ExcelCellStyleFactory styleFactory)
styleFactory
- the stylefactory for creating the cell styles.Method Detail |
public boolean isDefineDataFormats()
We try to directly map the java.text.SimpleDateFormat and java.text.DecimalFormat into their excel counter parts and hope that everything works fine. If not, you will have to adjust the format afterwards.
public void setDefineDataFormats(boolean defineDataFormats)
We try to directly map the java.text.SimpleDateFormat and java.text.DecimalFormat into their excel counter parts and hope that everything works fine. If not, you will have to adjust the format afterwards.
defineDataFormats
- set to true if cells should contain a custom data
format for numeric or date cells or false when all cells should contain strings.public ExcelCellStyleFactory getStyleFactory()
public TableCellData createCellData(Element element, java.awt.geom.Rectangle2D bounds)
If the tablemodel does not support the element type, return null.
If the data factory is configured to return data formats, this method will create advanced cell format strings based on the template system of JFreeReport.
element
- the element that should be converted into TableCellData.bounds
- the elements bounds within the table. The bounds are specified
in points.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |