org.jfree.report.modules.output.table.xls
Class ExcelDataCellStyle

java.lang.Object
  |
  +--org.jfree.report.modules.output.table.xls.ExcelDataCellStyle

public final class ExcelDataCellStyle
extends java.lang.Object

The ExcelDataCellStyle is used to collect style information for an excel cell. This information is later transformed into a excel HSSFCellStyle using the ExcelCellStyleFactory.

Author:
Heiko Evermann.

Constructor Summary
ExcelDataCellStyle(FontDefinition fontDefinition, java.awt.Color textColor, ElementAlignment horizontal, ElementAlignment vertical)
          Creates a new ExcelDataCellStyle object with the given attributes.
ExcelDataCellStyle(FontDefinition fontDefinition, java.awt.Color textColor, ElementAlignment horizontal, ElementAlignment vertical, java.lang.String dataStyle, boolean wrapText)
          Creates a new ExcelDataCellStyle definition.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 java.lang.String getDataStyle()
          Returns the defined cell data style.
 FontDefinition getFontDefinition()
          Gets the font style for the text in the cell.
 ElementAlignment getHorizontalAlignment()
          Gets the horizontal alignment for the cell.
 java.awt.Color getTextColor()
          Returns the text color for the cell.
 ElementAlignment getVerticalAlignment()
          Gets the vertical alignment for the cell.
 int hashCode()
          Returns a hash code value for the object.
 boolean isWrapText()
          Gets the word wrap setting for the cell.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExcelDataCellStyle

public ExcelDataCellStyle(FontDefinition fontDefinition,
                          java.awt.Color textColor,
                          ElementAlignment horizontal,
                          ElementAlignment vertical)
Creates a new ExcelDataCellStyle object with the given attributes.
Parameters:
fontDefinition - the font definition used in the cell.
textColor - the text color of the cell.
horizontal - the horizontal alignment of the cell contents.
vertical - the vertical alignment of the cell contents.

ExcelDataCellStyle

public ExcelDataCellStyle(FontDefinition fontDefinition,
                          java.awt.Color textColor,
                          ElementAlignment horizontal,
                          ElementAlignment vertical,
                          java.lang.String dataStyle,
                          boolean wrapText)
Creates a new ExcelDataCellStyle definition.
Parameters:
fontDefinition - the font definition used in the cell.
textColor - the text color of the cell.
horizontal - the horizontal alignment of the cell contents.
vertical - the vertical alignment of the cell contents.
dataStyle - the data style definition or null, if the default should be used.
wrapText - defines whether to wrap text in excel.
Method Detail

isWrapText

public boolean isWrapText()
Gets the word wrap setting for the cell.
Returns:
true, if wordwrapping is enabled, false otherwise.

getHorizontalAlignment

public ElementAlignment getHorizontalAlignment()
Gets the horizontal alignment for the cell.
Returns:
the horizontal alignment for the cell content.

getVerticalAlignment

public ElementAlignment getVerticalAlignment()
Gets the vertical alignment for the cell.
Returns:
the vertical alignment for the cell content.

getFontDefinition

public FontDefinition getFontDefinition()
Gets the font style for the text in the cell.
Returns:
the font definition for the text in the cell.

getTextColor

public java.awt.Color getTextColor()
Returns the text color for the cell.
Returns:
the text color.

getDataStyle

public java.lang.String getDataStyle()
Returns the defined cell data style.
Returns:
the cell data style.

equals

public boolean equals(java.lang.Object o)
Indicates whether some other object is "equal to" this one.
Overrides:
equals in class java.lang.Object
Parameters:
o - the reference object with which to compare.
Returns:
true if this object is the same as the obj argument; false otherwise.

hashCode

public int hashCode()
Returns a hash code value for the object. This method is supported for the benefit of hashtables such as those provided by java.util.Hashtable.
Overrides:
hashCode in class java.lang.Object
Returns:
a hash code value for this object.