|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.poi.xssf.usermodel.XSSFFont
public class XSSFFont
Represents a font used in a workbook.
| Field Summary | |
|---|---|
static short |
DEFAULT_FONT_COLOR
Default font color is black |
static java.lang.String |
DEFAULT_FONT_NAME
By default, Microsoft Office Excel 2007 uses the Calibry font in font size 11 |
static short |
DEFAULT_FONT_SIZE
By default, Microsoft Office Excel 2007 uses the Calibry font in font size 11 |
| Fields inherited from interface org.apache.poi.ss.usermodel.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 |
| Constructor Summary | |
|---|---|
XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font)
Create a new XSSFFont |
|
XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font,
int index)
|
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object o)
|
boolean |
getBold()
get a boolean value for the boldness to use. |
short |
getBoldweight()
get the boldness to use |
int |
getCharSet()
get character-set to use. |
short |
getColor()
get the indexed color value for the font References a color defined in IndexedColors. |
org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont |
getCTFont()
get the underlying CTFont font |
int |
getFamily()
get the font family to use. |
short |
getFontHeight()
get the font height in point. |
short |
getFontHeightInPoints()
|
java.lang.String |
getFontName()
get the name of the font (i.e. |
short |
getIndex()
get the index within the XSSFWorkbook (sequence within the collection of Font objects) |
boolean |
getItalic()
get a boolean value that specify whether to use italics or not |
org.apache.poi.ss.usermodel.FontScheme |
getScheme()
get the font scheme property. |
boolean |
getStrikeout()
get a boolean value that specify whether to use a strikeout horizontal line through the text or not |
short |
getThemeColor()
get the color value for the font References a color defined in theme. |
short |
getTypeOffset()
get normal,super or subscript. |
byte |
getUnderline()
get type of text underlining to use |
XSSFColor |
getXSSFColor()
get the color value for the font References a color defined as Standard Alpha Red Green Blue color value (ARGB). |
int |
hashCode()
|
long |
registerTo(StylesTable styles)
Perform a registration of ourselves to the style table |
void |
setBold(boolean bold)
set a boolean value for the boldness to use. |
void |
setBoldweight(short boldweight)
|
void |
setCharSet(byte charset)
set character-set to use. |
void |
setCharSet(org.apache.poi.ss.usermodel.FontCharset charSet)
set character-set to use. |
void |
setCharSet(int charset)
set character-set to use. |
void |
setColor(short color)
set the indexed color for the font |
void |
setColor(XSSFColor color)
set the color for the font in Standard Alpha Red Green Blue color value |
void |
setFamily(org.apache.poi.ss.usermodel.FontFamily family)
set an enumeration representing the font family this font belongs to. |
void |
setFamily(int value)
Set the font family this font belongs to. |
void |
setFontHeight(double height)
set the font height in points. |
void |
setFontHeight(short height)
set the font height in points. |
void |
setFontHeightInPoints(short height)
set the font height in points. |
void |
setFontName(java.lang.String name)
set the name for the font (i.e. |
void |
setItalic(boolean italic)
set a boolean value for the property specifying whether to use italics or not If omitted, the default value is true. |
void |
setScheme(org.apache.poi.ss.usermodel.FontScheme scheme)
set font scheme property |
void |
setStrikeout(boolean strikeout)
set a boolean value for the property specifying whether to use a strikeout horizontal line through the text or not If omitted, the default value is true. |
void |
setThemeColor(short theme)
set the theme color for the font to use |
void |
setThemesTable(ThemesTable themes)
Records the Themes Table that is associated with the current font, used when looking up theme based colours and properties. |
void |
setTypeOffset(short offset)
set normal,super or subscript, that representing the vertical-alignment setting. |
void |
setUnderline(byte underline)
set the style of underlining that is used. |
void |
setUnderline(org.apache.poi.ss.usermodel.FontUnderline underline)
set an enumeration representing the style of underlining that is used. |
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String DEFAULT_FONT_NAME
public static final short DEFAULT_FONT_SIZE
public static final short DEFAULT_FONT_COLOR
IndexedColors.BLACK| Constructor Detail |
|---|
public XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font)
font - the underlying CTFont bean
public XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font,
int index)
| Method Detail |
|---|
public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont getCTFont()
public boolean getBold()
public int getCharSet()
getCharSet in interface org.apache.poi.ss.usermodel.FontFontCharsetpublic short getColor()
getColor in interface org.apache.poi.ss.usermodel.FontIndexedColorspublic XSSFColor getXSSFColor()
public short getThemeColor()
public short getFontHeight()
getFontHeight in interface org.apache.poi.ss.usermodel.Fontpublic short getFontHeightInPoints()
getFontHeightInPoints in interface org.apache.poi.ss.usermodel.FontgetFontHeight()public java.lang.String getFontName()
getFontName in interface org.apache.poi.ss.usermodel.Fontpublic boolean getItalic()
getItalic in interface org.apache.poi.ss.usermodel.Fontpublic boolean getStrikeout()
getStrikeout in interface org.apache.poi.ss.usermodel.Fontpublic short getTypeOffset()
getTypeOffset in interface org.apache.poi.ss.usermodel.FontFont.SS_NONE,
Font.SS_SUPER,
Font.SS_SUBpublic byte getUnderline()
getUnderline in interface org.apache.poi.ss.usermodel.FontFontUnderlinepublic void setBold(boolean bold)
bold - - boldness to usepublic void setBoldweight(short boldweight)
setBoldweight in interface org.apache.poi.ss.usermodel.Fontpublic short getBoldweight()
getBoldweight in interface org.apache.poi.ss.usermodel.FontFont.BOLDWEIGHT_NORMAL,
Font.BOLDWEIGHT_BOLDpublic void setCharSet(byte charset)
setCharSet in interface org.apache.poi.ss.usermodel.Fontcharset - - charsetFontCharsetpublic void setCharSet(int charset)
setCharSet in interface org.apache.poi.ss.usermodel.Fontcharset - - charsetFontCharsetpublic void setCharSet(org.apache.poi.ss.usermodel.FontCharset charSet)
charSet - public void setColor(short color)
setColor in interface org.apache.poi.ss.usermodel.Fontcolor - - color to use- Note: default font color,
IndexedColorspublic void setColor(XSSFColor color)
color - - color to usepublic void setFontHeight(short height)
setFontHeight in interface org.apache.poi.ss.usermodel.Fontheight - - height in pointspublic void setFontHeight(double height)
height - - height in pointspublic void setFontHeightInPoints(short height)
setFontHeightInPoints in interface org.apache.poi.ss.usermodel.Fontpublic void setThemeColor(short theme)
theme - - theme color to usepublic void setFontName(java.lang.String name)
setFontName in interface org.apache.poi.ss.usermodel.Fontname - - value representing the name of the font to useDEFAULT_FONT_NAMEpublic void setItalic(boolean italic)
setItalic in interface org.apache.poi.ss.usermodel.Fontitalic - - value for italics or notpublic void setStrikeout(boolean strikeout)
setStrikeout in interface org.apache.poi.ss.usermodel.Fontstrikeout - - value for strikeout or notpublic void setTypeOffset(short offset)
setTypeOffset in interface org.apache.poi.ss.usermodel.Fontoffset - - offset type to use (none,super,sub)Font.SS_NONE,
Font.SS_SUPER,
Font.SS_SUBpublic void setUnderline(byte underline)
setUnderline in interface org.apache.poi.ss.usermodel.Fontunderline - - underline type to useFontUnderlinepublic void setUnderline(org.apache.poi.ss.usermodel.FontUnderline underline)
underline - - FontUnderline enum valuepublic java.lang.String toString()
toString in class java.lang.Objectpublic long registerTo(StylesTable styles)
public void setThemesTable(ThemesTable themes)
public org.apache.poi.ss.usermodel.FontScheme getScheme()
StylesTable.createDefaultFont()public void setScheme(org.apache.poi.ss.usermodel.FontScheme scheme)
scheme - - FontScheme enum valueFontSchemepublic int getFamily()
FontFamilypublic void setFamily(int value)
value - - font familyFontFamilypublic void setFamily(org.apache.poi.ss.usermodel.FontFamily family)
family - font familypublic short getIndex()
getIndex in interface org.apache.poi.ss.usermodel.Fontpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in class java.lang.Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||