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

java.lang.Object
  |
  +--com.jrefinery.report.targets.table.excel.HSSFFontWrapper

public class HSSFFontWrapper
extends java.lang.Object

The HSSFFontWrapper is used to store excel style font informations.

Author:
Heiko Evermann

Field Summary
static int FONT_FACTOR
          scale between Excel and awt.
 
Constructor Summary
HSSFFontWrapper(FontDefinition font, java.awt.Color color)
          Creates a new HSSFFontWrapper for the given font and color.
HSSFFontWrapper(org.apache.poi.hssf.usermodel.HSSFFont font)
          Creates a HSSFFontWrapper for the excel font.
 
Method Summary
 boolean equals(java.lang.Object o)
          Indicates whether some other object is "equal to" this one.
 org.apache.poi.hssf.usermodel.HSSFFont getFont(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
          Returns the excel font stored in this wrapper.
 int hashCode()
          Returns a hash code value for the object.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FONT_FACTOR

public static final int FONT_FACTOR
scale between Excel and awt. With this value it looks fine.

See Also:
Constant Field Values
Constructor Detail

HSSFFontWrapper

public HSSFFontWrapper(FontDefinition font,
                       java.awt.Color color)
Creates a new HSSFFontWrapper for the given font and color.

Parameters:
font - the wrapped font.
color - the foreground color.

HSSFFontWrapper

public HSSFFontWrapper(org.apache.poi.hssf.usermodel.HSSFFont font)
Creates a HSSFFontWrapper for the excel font.

Parameters:
font - the font.
Method Detail

getFont

public org.apache.poi.hssf.usermodel.HSSFFont getFont(org.apache.poi.hssf.usermodel.HSSFWorkbook workbook)
Returns the excel font stored in this wrapper.

Parameters:
workbook - the workbook, that will be used to create the font.
Returns:
the created font.

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 compared object.
Returns:
true, if the font wrapper contains the same font definition, 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:
the hash code.