public class XSSFFontFormatting extends java.lang.Object implements FontFormatting
SS_NONE, SS_SUB, SS_SUPER, U_DOUBLE, U_DOUBLE_ACCOUNTING, U_NONE, U_SINGLE, U_SINGLE_ACCOUNTING
Modifier and Type | Method and Description |
---|---|
short |
getEscapementType()
get the type of super or subscript for the font
|
XSSFColor |
getFontColor() |
short |
getFontColorIndex() |
int |
getFontHeight()
gets the height of the font in 1/20th point units
|
short |
getUnderlineType()
get the type of underlining for the font
|
boolean |
isBold()
get whether the font weight is set to bold or not
|
boolean |
isItalic() |
boolean |
isStruckout()
XMLBeans and the XSD make this look like it can have multiple values, but it is maxOccurrs=1.
|
void |
resetFontStyle()
set font style options to default values (non-italic, non-bold)
|
void |
setEscapementType(short escapementType)
set the escapement type for the font
|
void |
setFontColor(Color color)
Sets the colour to use
|
void |
setFontColorIndex(short color)
Sets the indexed colour to use
|
void |
setFontHeight(int height)
Sets the height of the font in 1/20th point units
|
void |
setFontStyle(boolean italic,
boolean bold)
set font style options.
|
void |
setUnderlineType(short underlineType)
set the type of underlining type for the font
|
public short getEscapementType()
getEscapementType
in interface FontFormatting
FontFormatting.SS_NONE
,
FontFormatting.SS_SUPER
,
FontFormatting.SS_SUB
public void setEscapementType(short escapementType)
setEscapementType
in interface FontFormatting
escapementType
- super or subscript optionFontFormatting.SS_NONE
,
FontFormatting.SS_SUPER
,
FontFormatting.SS_SUB
public boolean isStruckout()
isStruckout
in interface FontFormatting
FontFormatting.isStruckout()
public short getFontColorIndex()
getFontColorIndex
in interface FontFormatting
public void setFontColorIndex(short color)
FontFormatting
setFontColorIndex
in interface FontFormatting
color
- font color indexpublic XSSFColor getFontColor()
getFontColor
in interface FontFormatting
public void setFontColor(Color color)
FontFormatting
setFontColor
in interface FontFormatting
color
- font colour to usepublic int getFontHeight()
getFontHeight
in interface FontFormatting
public void setFontHeight(int height)
setFontHeight
in interface FontFormatting
height
- the height in twips (in points/20)public short getUnderlineType()
getUnderlineType
in interface FontFormatting
FontFormatting.U_NONE
,
FontFormatting.U_SINGLE
,
FontFormatting.U_DOUBLE
,
FontFormatting.U_SINGLE_ACCOUNTING
,
FontFormatting.U_DOUBLE_ACCOUNTING
public void setUnderlineType(short underlineType)
setUnderlineType
in interface FontFormatting
underlineType
- super or subscript optionFontFormatting.U_NONE
,
FontFormatting.U_SINGLE
,
FontFormatting.U_DOUBLE
,
FontFormatting.U_SINGLE_ACCOUNTING
,
FontFormatting.U_DOUBLE_ACCOUNTING
public boolean isBold()
isBold
in interface FontFormatting
public boolean isItalic()
isItalic
in interface FontFormatting
public void setFontStyle(boolean italic, boolean bold)
setFontStyle
in interface FontFormatting
italic
- - if true, set posture style to italic, otherwise to normalbold
- if true, set font weight to bold, otherwise to normalpublic void resetFontStyle()
resetFontStyle
in interface FontFormatting
Copyright 2018 The Apache Software Foundation or its licensors, as applicable.