public final class HSSFFont extends Object implements Font
HSSFWorkbook.createFont(),
HSSFWorkbook.getFontAt(short),
HSSFCellStyle.setFont(HSSFFont)| Modifier and Type | Field and Description |
|---|---|
static String |
FONT_ARIAL
Arial font
|
ANSI_CHARSET, BOLDWEIGHT_BOLD, BOLDWEIGHT_NORMAL, COLOR_NORMAL, COLOR_RED, DEFAULT_CHARSET, SS_NONE, SS_SUB, SS_SUPER, SYMBOL_CHARSET, U_DOUBLE, U_DOUBLE_ACCOUNTING, U_NONE, U_SINGLE, U_SINGLE_ACCOUNTING| Modifier | Constructor and Description |
|---|---|
protected |
HSSFFont(short index,
FontRecord rec)
Creates a new instance of HSSFFont
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
short |
getBoldweight()
get the boldness to use
|
int |
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.
|
HSSFColor |
getHSSFColor(HSSFWorkbook wb)
get the color value for the font
|
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
|
int |
hashCode() |
boolean |
isOverrideBold() |
boolean |
isOverrideColor() |
boolean |
isOverrideHeightPoints() |
boolean |
isOverrideItalic() |
boolean |
isOverrideName() |
boolean |
isOverrideStrikeout() |
boolean |
isOverrideTypeOffset() |
boolean |
isOverrideUnderline() |
void |
setBoldweight(short boldweight)
set the boldness to use
|
void |
setCharSet(byte charset)
set character-set to use.
|
void |
setCharSet(int 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
protected HSSFFont(short index,
FontRecord rec)
public void setFontName(String name)
setFontName in interface Fontname - String representing the name of the font to useFONT_ARIALpublic String getFontName()
getFontName in interface FontFONT_ARIALpublic short getIndex()
public void setFontHeight(short height)
setFontHeight in interface Fontheight - height in 1/20ths of a pointsetFontHeightInPoints(short)public void setFontHeightInPoints(short height)
setFontHeightInPoints in interface Fontheight - height in the familiar unit of measure - pointssetFontHeight(short)public short getFontHeight()
getFontHeight in interface FontgetFontHeightInPoints()public short getFontHeightInPoints()
getFontHeightInPoints in interface FontgetFontHeight()public void setItalic(boolean italic)
public boolean getItalic()
public void setStrikeout(boolean strikeout)
setStrikeout in interface Fontstrikeout - or notpublic boolean getStrikeout()
getStrikeout in interface Fontpublic void setColor(short color)
setColor in interface Fontcolor - to useNote: Use this rather than HSSFColor.AUTOMATIC for default font color,
Font.COLOR_REDpublic short getColor()
getColor in interface FontFont.COLOR_NORMAL,
Font.COLOR_RED,
HSSFPalette.getColor(short)public HSSFColor getHSSFColor(HSSFWorkbook wb)
public void setBoldweight(short boldweight)
setBoldweight in interface Fontboldweight - Font.BOLDWEIGHT_NORMAL,
Font.BOLDWEIGHT_BOLDpublic short getBoldweight()
getBoldweight in interface FontFont.BOLDWEIGHT_NORMAL,
Font.BOLDWEIGHT_BOLDpublic void setTypeOffset(short offset)
setTypeOffset in interface Fontoffset - type to use (none,super,sub)Font.SS_NONE,
Font.SS_SUPER,
Font.SS_SUBpublic short getTypeOffset()
getTypeOffset in interface FontFont.SS_NONE,
Font.SS_SUPER,
Font.SS_SUBpublic void setUnderline(byte underline)
setUnderline in interface Fontunderline - typeFont.U_NONE,
Font.U_SINGLE,
Font.U_DOUBLE,
Font.U_SINGLE_ACCOUNTING,
Font.U_DOUBLE_ACCOUNTINGpublic byte getUnderline()
getUnderline in interface FontFont.U_NONE,
Font.U_SINGLE,
Font.U_DOUBLE,
Font.U_SINGLE_ACCOUNTING,
Font.U_DOUBLE_ACCOUNTINGpublic int getCharSet()
getCharSet in interface FontFont.ANSI_CHARSET,
Font.DEFAULT_CHARSET,
Font.SYMBOL_CHARSETpublic void setCharSet(int charset)
setCharSet in interface FontFont.ANSI_CHARSET,
Font.DEFAULT_CHARSET,
Font.SYMBOL_CHARSETpublic void setCharSet(byte charset)
setCharSet in interface FontFont.ANSI_CHARSET,
Font.DEFAULT_CHARSET,
Font.SYMBOL_CHARSETpublic boolean isOverrideName()
isOverrideName in interface Fontpublic boolean isOverrideColor()
isOverrideColor in interface Fontpublic boolean isOverrideBold()
isOverrideBold in interface Fontpublic boolean isOverrideItalic()
isOverrideItalic in interface Fontpublic boolean isOverrideStrikeout()
isOverrideStrikeout in interface Fontpublic boolean isOverrideUnderline()
isOverrideUnderline in interface Fontpublic boolean isOverrideHeightPoints()
isOverrideHeightPoints in interface Fontpublic boolean isOverrideTypeOffset()
isOverrideTypeOffset in interface FontCopyright © 2020. All rights reserved.