|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.poi.hssf.usermodel.HSSFFont
Represents a Font used in a workbook.
HSSFWorkbook.createFont()
,
HSSFWorkbook.getFontAt(short)
,
HSSFCellStyle.setFont(HSSFFont)
Field Summary | |
static short |
BOLDWEIGHT_BOLD
Bold boldness (bold) |
static short |
BOLDWEIGHT_NORMAL
Normal boldness (not bold) |
static short |
COLOR_NORMAL
normal type of black color |
static short |
COLOR_RED
Dark Red color |
static java.lang.String |
FONT_ARIAL
Arial font |
static short |
SS_NONE
no type offsetting (not super or subscript) |
static short |
SS_SUB
subscript |
static short |
SS_SUPER
superscript |
static byte |
U_DOUBLE
double underlined |
static byte |
U_DOUBLE_ACCOUNTING
accounting style double underline |
static byte |
U_NONE
not underlined |
static byte |
U_SINGLE
single (normal) underline |
static byte |
U_SINGLE_ACCOUNTING
accounting style single underline |
Constructor Summary | |
protected |
HSSFFont(short index,
FontRecord rec)
Creates a new instance of HSSFFont |
Method Summary | |
short |
getBoldweight()
get the boldness 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 |
java.lang.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 |
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(java.lang.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 |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.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
Constructor Detail |
protected HSSFFont(short index, FontRecord rec)
Method Detail |
public void setFontName(java.lang.String name)
name
- String representing the name of the font to useFONT_ARIAL
public java.lang.String getFontName()
FONT_ARIAL
public short getIndex()
public void setFontHeight(short height)
setFontHeightInPoints(short)
public void setFontHeightInPoints(short height)
setFontHeight(short)
public short getFontHeight()
getFontHeightInPoints()
public short getFontHeightInPoints()
getFontHeight()
public void setItalic(boolean italic)
public boolean getItalic()
public void setStrikeout(boolean strikeout)
strikeout
- or notpublic boolean getStrikeout()
public void setColor(short color)
color
- to useCOLOR_NORMAL
,
COLOR_RED
public short getColor()
COLOR_NORMAL
,
COLOR_RED
public void setBoldweight(short boldweight)
boldweight
- BOLDWEIGHT_NORMAL
,
BOLDWEIGHT_BOLD
public short getBoldweight()
BOLDWEIGHT_NORMAL
,
BOLDWEIGHT_BOLD
public void setTypeOffset(short offset)
offset
- type to use (none,super,sub)SS_NONE
,
SS_SUPER
,
SS_SUB
public short getTypeOffset()
SS_NONE
,
SS_SUPER
,
SS_SUB
public void setUnderline(byte underline)
underline
- typeU_NONE
,
U_SINGLE
,
U_DOUBLE
,
U_SINGLE_ACCOUNTING
,
U_DOUBLE_ACCOUNTING
public byte getUnderline()
U_NONE
,
U_SINGLE
,
U_DOUBLE
,
U_SINGLE_ACCOUNTING
,
U_DOUBLE_ACCOUNTING
public java.lang.String toString()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |