org.pentaho.reporting.engine.classic.core.modules.output.table.xls.helper
Class HSSFFontWrapper

java.lang.Object
  extended by org.pentaho.reporting.engine.classic.core.modules.output.table.xls.helper.HSSFFontWrapper

public final class HSSFFontWrapper
extends 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(org.apache.poi.ss.usermodel.Font font)
          Creates a HSSFFontWrapper for the excel font.
HSSFFontWrapper(String fontName, short fontSize, boolean bold, boolean italic, boolean underline, boolean strikethrough, short colorIndex)
          Creates a new HSSFFontWrapper for the given font and color.
 
Method Summary
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 short getColorIndex()
           
 int getFontHeight()
           
 String getFontName()
           
 int getHashCode()
           
 int hashCode()
          Returns a hash code value for the object.
 boolean isBold()
           
 boolean isItalic()
           
 boolean isStrikethrough()
           
 boolean isUnderline()
           
 
Methods inherited from class java.lang.Object
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(String fontName,
                       short fontSize,
                       boolean bold,
                       boolean italic,
                       boolean underline,
                       boolean strikethrough,
                       short colorIndex)
Creates a new HSSFFontWrapper for the given font and color.

Parameters:
fontName - the name of the wrapped font.
fontSize - the name of the wrapped font.
bold - a font style flag.
italic - a font style flag.
underline - a font style flag.
strikethrough - a font style flag.
colorIndex - the foreground color.

HSSFFontWrapper

public HSSFFontWrapper(org.apache.poi.ss.usermodel.Font font)
Creates a HSSFFontWrapper for the excel font.

Parameters:
font - the font.
Method Detail

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class 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 Object
Returns:
the hash code.

isBold

public boolean isBold()

getColorIndex

public short getColorIndex()

getFontHeight

public int getFontHeight()

getFontName

public String getFontName()

getHashCode

public int getHashCode()

isItalic

public boolean isItalic()

isStrikethrough

public boolean isStrikethrough()

isUnderline

public boolean isUnderline()