com.jrefinery.report.targets.table
Class AbstractTableCellDataFactory
java.lang.Object
|
+--com.jrefinery.report.targets.table.AbstractTableCellDataFactory
- All Implemented Interfaces:
- TableCellDataFactory
- Direct Known Subclasses:
- ExcelCellDataFactory, HtmlCellDataFactory, RTFCellDataFactory
- public abstract class AbstractTableCellDataFactory
- extends java.lang.Object
- implements TableCellDataFactory
A base implementation of the TableCellDataFactory
interface, which is able to handle
background cell and band cells.
- Author:
- Thomas Morgner
- See Also:
TableBandArea
,
TableCellData
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractTableCellDataFactory
public AbstractTableCellDataFactory()
createBandCell
public TableCellData createBandCell(java.awt.geom.Rectangle2D rect)
- Create a band cell for the given element. A band cell is used to create
borders for the band bounds, and contains no other data or formats.
- Parameters:
rect
- the bounds of the element.
- Returns:
- The band area or
null, if the band has a height or width of 0.
createBackground
public TableCellBackground createBackground(Element e,
java.awt.Shape shape,
java.awt.geom.Rectangle2D bounds)
- Handles the creation of background cells. This implementation translates lines
and rectangles into border and background color specifications.
The shape must be either a horizontal or vertical line or a rectangle. Other
shape types are ignored, as they cannot be translated into the table cell space.
- Parameters:
e
- the element that defines the background, usually a ShapeElement
.shape
- the shape that should be used as background.bounds
- the element's bounds within the table.
- Returns:
- the generated
TableCellBackground
or null
if the background
shape is not supported.