Modifier and Type | Field and Description |
---|---|
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
|
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 |
XSSFFont()
Create a new XSSFont.
|
|
XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font)
Create a new XSSFFont
|
|
XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font,
int index) |
Modifier and Type | Method and Description |
---|---|
static XSSFFont |
createDxfFont() |
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()
get the font height
|
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
|
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() |
boolean |
isOverrideBold() |
boolean |
isOverrideColor() |
boolean |
isOverrideHeightPoints() |
boolean |
isOverrideItalic() |
boolean |
isOverrideName() |
boolean |
isOverrideStrikeout() |
boolean |
isOverrideTypeOffset() |
boolean |
isOverrideUnderline() |
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(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(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(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(FontUnderline underline)
set an enumeration representing the style of underlining that is used.
|
java.lang.String |
toString() |
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
public XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font)
font
- the underlying CTFont beanpublic XSSFFont(org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont font, int index)
protected XSSFFont()
@Internal public org.openxmlformats.schemas.spreadsheetml.x2006.main.CTFont getCTFont()
public boolean getBold()
public int getCharSet()
getCharSet
in interface Font
FontCharset
public short getColor()
getColor
in interface Font
IndexedColors
public XSSFColor getXSSFColor()
public short getThemeColor()
public short getFontHeight()
getFontHeight
in interface Font
Font.getFontHeightInPoints()
public short getFontHeightInPoints()
Font
getFontHeightInPoints
in interface Font
getFontHeight()
public java.lang.String getFontName()
getFontName
in interface Font
public boolean getItalic()
public boolean getStrikeout()
getStrikeout
in interface Font
public short getTypeOffset()
getTypeOffset
in interface Font
Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public byte getUnderline()
getUnderline
in interface Font
FontUnderline
public void setBold(boolean bold)
bold
- - boldness to usepublic void setBoldweight(short boldweight)
setBoldweight
in interface Font
public short getBoldweight()
getBoldweight
in interface Font
Font.BOLDWEIGHT_NORMAL
,
Font.BOLDWEIGHT_BOLD
public void setCharSet(byte charset)
setCharSet
in interface Font
charset
- - charsetFontCharset
public void setCharSet(int charset)
setCharSet
in interface Font
charset
- - charsetFontCharset
public void setCharSet(FontCharset charSet)
charSet
- public void setColor(short color)
setColor
in interface Font
color
- - color to use- Note: default font color
,
IndexedColors
public void setColor(XSSFColor color)
color
- - color to usepublic void setFontHeight(short height)
setFontHeight
in interface Font
height
- - height in pointsFont.setFontHeightInPoints(short)
public void setFontHeight(double height)
height
- - height in pointspublic void setFontHeightInPoints(short height)
setFontHeightInPoints
in interface Font
height
- height in the familiar unit of measure - pointsFont.setFontHeight(short)
public void setThemeColor(short theme)
theme
- - theme color to usepublic void setFontName(java.lang.String name)
setFontName
in interface Font
name
- - value representing the name of the font to useDEFAULT_FONT_NAME
public void setItalic(boolean italic)
public void setStrikeout(boolean strikeout)
setStrikeout
in interface Font
strikeout
- - value for strikeout or notpublic void setTypeOffset(short offset)
setTypeOffset
in interface Font
offset
- - offset type to use (none,super,sub)Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public void setUnderline(byte underline)
setUnderline
in interface Font
underline
- - underline type to useFontUnderline
public void setUnderline(FontUnderline underline)
underline
- - FontUnderline enum valuepublic java.lang.String toString()
toString
in class java.lang.Object
public long registerTo(StylesTable styles)
public void setThemesTable(ThemesTable themes)
public FontScheme getScheme()
StylesTable.createDefaultFont()
public void setScheme(FontScheme scheme)
scheme
- - FontScheme enum valueFontScheme
public int getFamily()
FontFamily
public void setFamily(int value)
value
- - font familyFontFamily
public void setFamily(FontFamily family)
family
- font familypublic short getIndex()
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public boolean isOverrideName()
isOverrideName
in interface Font
public boolean isOverrideColor()
isOverrideColor
in interface Font
public boolean isOverrideBold()
isOverrideBold
in interface Font
public boolean isOverrideItalic()
isOverrideItalic
in interface Font
public boolean isOverrideStrikeout()
isOverrideStrikeout
in interface Font
public boolean isOverrideUnderline()
isOverrideUnderline
in interface Font
public boolean isOverrideHeightPoints()
isOverrideHeightPoints
in interface Font
public boolean isOverrideTypeOffset()
isOverrideTypeOffset
in interface Font
public static XSSFFont createDxfFont()
Copyright © 2005-2010 Potix Corporation. All Rights Reserved.