|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.poi.hssf.usermodel.HSSFFont
public final class HSSFFont
Represents a Font used in a workbook.
HSSFWorkbook.createFont()
,
HSSFWorkbook.getFontAt(short)
,
HSSFCellStyle.setFont(HSSFFont)
Field Summary | |
---|---|
static java.lang.String |
FONT_ARIAL
Arial font |
Fields inherited from interface org.apache.poi.ss.usermodel.Font |
---|
ANSI_CHARSET, 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 |
Constructor Summary | |
---|---|
protected |
HSSFFont(short index,
FontRecord rec)
Creates a new instance of HSSFFont |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
|
boolean |
getBold()
get if the font is bold or not |
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 |
java.lang.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()
|
void |
setBold(boolean bold)
sets the font to be bold or not |
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(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, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FONT_ARIAL
Constructor Detail |
---|
protected HSSFFont(short index, FontRecord rec)
Method Detail |
---|
public void setFontName(java.lang.String name)
setFontName
in interface Font
name
- String representing the name of the font to useFONT_ARIAL
public java.lang.String getFontName()
getFontName
in interface Font
FONT_ARIAL
public short getIndex()
getIndex
in interface Font
public void setFontHeight(short height)
setFontHeight
in interface Font
height
- height in 1/20ths of a pointsetFontHeightInPoints(short)
public void setFontHeightInPoints(short height)
setFontHeightInPoints
in interface Font
height
- height in the familiar unit of measure - pointssetFontHeight(short)
public short getFontHeight()
getFontHeight
in interface Font
getFontHeightInPoints()
public short getFontHeightInPoints()
getFontHeightInPoints
in interface Font
getFontHeight()
public void setItalic(boolean italic)
setItalic
in interface Font
italic
- italics or notpublic boolean getItalic()
getItalic
in interface Font
public void setStrikeout(boolean strikeout)
setStrikeout
in interface Font
strikeout
- or notpublic boolean getStrikeout()
getStrikeout
in interface Font
public void setColor(short color)
setColor
in interface Font
color
- to useNote: Use this rather than HSSFColor.AUTOMATIC for default font color
,
Font.COLOR_RED
public short getColor()
getColor
in interface Font
Font.COLOR_NORMAL
,
Font.COLOR_RED
,
HSSFPalette.getColor(short)
public HSSFColor getHSSFColor(HSSFWorkbook wb)
public void setBold(boolean bold)
setBold
in interface Font
public boolean getBold()
getBold
in interface Font
public void setTypeOffset(short offset)
setTypeOffset
in interface Font
offset
- type to use (none,super,sub)Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public short getTypeOffset()
getTypeOffset
in interface Font
Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public void setUnderline(byte underline)
setUnderline
in interface Font
underline
- typeFont.U_NONE
,
Font.U_SINGLE
,
Font.U_DOUBLE
,
Font.U_SINGLE_ACCOUNTING
,
Font.U_DOUBLE_ACCOUNTING
public byte getUnderline()
getUnderline
in interface Font
Font.U_NONE
,
Font.U_SINGLE
,
Font.U_DOUBLE
,
Font.U_SINGLE_ACCOUNTING
,
Font.U_DOUBLE_ACCOUNTING
public int getCharSet()
getCharSet
in interface Font
Font.ANSI_CHARSET
,
Font.DEFAULT_CHARSET
,
Font.SYMBOL_CHARSET
public void setCharSet(int charset)
setCharSet
in interface Font
Font.ANSI_CHARSET
,
Font.DEFAULT_CHARSET
,
Font.SYMBOL_CHARSET
public void setCharSet(byte charset)
setCharSet
in interface Font
Font.ANSI_CHARSET
,
Font.DEFAULT_CHARSET
,
Font.SYMBOL_CHARSET
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |