com.jrefinery.report.targets.table.excel
Class ExcelCellData

java.lang.Object
  |
  +--com.jrefinery.report.targets.table.TableCellData
        |
        +--com.jrefinery.report.targets.table.excel.ExcelCellData
Direct Known Subclasses:
DateExcelCellData, DefaultExcelCellData, NumericExcelCellData

public abstract class ExcelCellData
extends TableCellData

Abstract base class for all Excel data cells.

The Excel cell style is used to define excel specific format informations, such as Colors, FormatStrings, Fonts etc.

The cell implementation is responsible for updating the externaly created HSSFCell, so that the format and the data applied to the cell.

Author:
Heiko Evermann.

Constructor Summary
ExcelCellData(java.awt.geom.Rectangle2D elementBounds, ExcelDataCellStyle style)
          Creates new ExcelCellData.
 
Method Summary
abstract  void applyContent(org.apache.poi.hssf.usermodel.HSSFCell cell)
          Applies the cells content and formats to the given HSSFCell.
 ExcelDataCellStyle getExcelCellStyle()
          Gets the defined style for this cell.
 boolean isBackground()
          Returns always false, as this is a data cell.
abstract  boolean isEmpty()
          Tests, whether the cell is empty.
 java.lang.String toString()
          Returns a string representation of this cell.
 
Methods inherited from class com.jrefinery.report.targets.table.TableCellData
getBounds
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ExcelCellData

public ExcelCellData(java.awt.geom.Rectangle2D elementBounds,
                     ExcelDataCellStyle style)
Creates new ExcelCellData.

Parameters:
elementBounds - are calculated outside
style - the assigned cell style.
Method Detail

applyContent

public abstract void applyContent(org.apache.poi.hssf.usermodel.HSSFCell cell)
Applies the cells content and formats to the given HSSFCell.

Parameters:
cell - the cell, that should be formated.

getExcelCellStyle

public ExcelDataCellStyle getExcelCellStyle()
Gets the defined style for this cell.

Returns:
the defined style for this cell.

isBackground

public final boolean isBackground()
Returns always false, as this is a data cell.

Specified by:
isBackground in class TableCellData
Returns:
always false.

toString

public java.lang.String toString()
Returns a string representation of this cell.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of the cell.
See Also:
Object.toString()

isEmpty

public abstract boolean isEmpty()
Tests, whether the cell is empty. Empty cells may transport a format, but they don't contain data.

Returns:
true, if the cell is empty, false otherwise.