public class HSSFFont extends Object
HSSFWorkbook.createFont(), 
HSSFWorkbook.getFontAt(short), 
HSSFCellStyle.setFont(HSSFFont)| Modifier and Type | Field and Description | 
|---|---|
| static byte | ANSI_CHARSETANSI character set | 
| static short | BOLDWEIGHT_BOLDBold boldness (bold) | 
| static short | BOLDWEIGHT_NORMALNormal boldness (not bold) | 
| static short | COLOR_NORMALnormal type of black color. | 
| static short | COLOR_REDDark Red color | 
| static byte | DEFAULT_CHARSETDefault character set. | 
| static String | FONT_ARIALArial font | 
| static short | SS_NONEno type offsetting (not super or subscript) | 
| static short | SS_SUBsubscript | 
| static short | SS_SUPERsuperscript | 
| static byte | SYMBOL_CHARSETSymbol character set | 
| static byte | U_DOUBLEdouble underlined | 
| static byte | U_DOUBLE_ACCOUNTINGaccounting style double underline | 
| static byte | U_NONEnot underlined | 
| static byte | U_SINGLEsingle (normal) underline | 
| static byte | U_SINGLE_ACCOUNTINGaccounting style single underline | 
| Modifier | Constructor and Description | 
|---|---|
| protected  | HSSFFont(short index,
        FontRecord rec)Creates a new instance of HSSFFont | 
| Modifier and Type | Method and Description | 
|---|---|
| short | getBoldweight()get the boldness to use | 
| byte | getCharSet()get character-set to use. | 
| short | getColor()get the color for the font | 
| short | getFontHeight()get the font height in unit's of 1/20th of a point. | 
| short | getFontHeightInPoints()get the font height | 
| String | getFontName()get the name for the font (i.e. | 
| short | getIndex()get the index within the HSSFWorkbook (sequence within the collection of Font objects) | 
| boolean | getItalic()get whether to use italics or not | 
| boolean | getStrikeout()get whether to use a strikeout horizontal line through the text or not | 
| short | getTypeOffset()get normal,super or subscript. | 
| byte | getUnderline()get type of text underlining to use | 
| void | setBoldweight(short boldweight)set the boldness to use | 
| void | setCharSet(byte charset)set character-set to use. | 
| void | setColor(short color)set the color for the font | 
| void | setFontHeight(short height)set the font height in unit's of 1/20th of a point. | 
| void | setFontHeightInPoints(short height)set the font height | 
| void | setFontName(String name)set the name for the font (i.e. | 
| void | setItalic(boolean italic)set whether to use italics or not | 
| void | setStrikeout(boolean strikeout)set whether to use a strikeout horizontal line through the text or not | 
| void | setTypeOffset(short offset)set normal,super or subscript. | 
| void | setUnderline(byte underline)set type of text underlining to use | 
| String | toString() | 
public static final String FONT_ARIAL
public static final short BOLDWEIGHT_NORMAL
public static final short BOLDWEIGHT_BOLD
public static final short COLOR_NORMAL
public static final short COLOR_RED
public static final short SS_NONE
public static final short SS_SUPER
public static final short SS_SUB
public static final byte U_NONE
public static final byte U_SINGLE
public static final byte U_DOUBLE
public static final byte U_SINGLE_ACCOUNTING
public static final byte U_DOUBLE_ACCOUNTING
public static final byte ANSI_CHARSET
public static final byte DEFAULT_CHARSET
public static final byte SYMBOL_CHARSET
protected HSSFFont(short index,
        FontRecord rec)
public void setFontName(String name)
name - String representing the name of the font to useFONT_ARIALpublic String getFontName()
FONT_ARIALpublic short getIndex()
public void setFontHeight(short height)
height - height in 1/20ths of a pointsetFontHeightInPoints(short)public void setFontHeightInPoints(short height)
height - height in the familiar unit of measure - pointssetFontHeight(short)public short getFontHeight()
getFontHeightInPoints()public short getFontHeightInPoints()
getFontHeight()public void setItalic(boolean italic)
italic - italics or notpublic boolean getItalic()
public void setStrikeout(boolean strikeout)
strikeout - or notpublic boolean getStrikeout()
public void setColor(short color)
color - to useNote: Use this rather than HSSFColor.AUTOMATIC for default font color, 
COLOR_REDpublic short getColor()
COLOR_NORMAL, 
COLOR_REDpublic void setBoldweight(short boldweight)
boldweight - BOLDWEIGHT_NORMAL, 
BOLDWEIGHT_BOLDpublic short getBoldweight()
BOLDWEIGHT_NORMAL, 
BOLDWEIGHT_BOLDpublic void setTypeOffset(short offset)
public short getTypeOffset()
public void setUnderline(byte underline)
underline - typeU_NONE, 
U_SINGLE, 
U_DOUBLE, 
U_SINGLE_ACCOUNTING, 
U_DOUBLE_ACCOUNTINGpublic byte getUnderline()
U_NONE, 
U_SINGLE, 
U_DOUBLE, 
U_SINGLE_ACCOUNTING, 
U_DOUBLE_ACCOUNTINGpublic byte getCharSet()
ANSI_CHARSET, 
DEFAULT_CHARSET, 
SYMBOL_CHARSETpublic void setCharSet(byte charset)
ANSI_CHARSET, 
DEFAULT_CHARSET, 
SYMBOL_CHARSETCopyright © 2014 Open Microscopy Environment