public class XSSFFontFormatting extends java.lang.Object implements FontFormatting
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
(以 1/20 点为单位获取字体高度)
|
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.
(XMLBeans 和 XSD 使它看起来可以有多个值,但它是 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
(以 1/20 磅为单位设置字体高度)
|
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 中的 getEscapementType)
Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public void setEscapementType(short escapementType)
setEscapementType
in interface
FontFormatting
(接口 FontFormatting 中的 setEscapementType)
escapementType
- super or subscript option
(escapementType - 上标或下标选项)
Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public boolean isStruckout()
isStruckout
in interface
FontFormatting
(接口 FontFormatting 中的 isStruckout)
FontFormatting.isStruckout()
public short getFontColorIndex()
getFontColorIndex
in interface
FontFormatting
(接口 FontFormatting 中的 getFontColorIndex)
public void setFontColorIndex(short color)
FontFormatting
setFontColorIndex
in interface
FontFormatting
(接口 FontFormatting 中的 setFontColorIndex)
color
- font color index
(color - 字体颜色索引)
public XSSFColor getFontColor()
getFontColor
in interface
FontFormatting
(接口 FontFormatting 中的 getFontColor)
public void setFontColor(Color color)
FontFormatting
setFontColor
in interface
FontFormatting
(接口 FontFormatting 中的 setFontColor)
color
- font colour to use
(color - 要使用的字体颜色)
public int getFontHeight()
getFontHeight
in interface
FontFormatting
(接口 FontFormatting 中的 getFontHeight)
public void setFontHeight(int height)
setFontHeight
in interface
FontFormatting
(接口 FontFormatting 中的 setFontHeight)
height
- the height in twips (in points/20)
(height - 缇的高度(点/20))
public short getUnderlineType()
getUnderlineType
in interface
FontFormatting
(接口 FontFormatting 中的 getUnderlineType)
Font.U_NONE
,
Font.U_SINGLE
,
Font.U_DOUBLE
,
Font.U_SINGLE_ACCOUNTING
,
Font.U_DOUBLE_ACCOUNTING
public void setUnderlineType(short underlineType)
setUnderlineType
in interface
FontFormatting
(接口 FontFormatting 中的 setUnderlineType)
underlineType
- super or subscript option
(underlineType - 上标或下标选项)
Font.U_NONE
,
Font.U_SINGLE
,
Font.U_DOUBLE
,
Font.U_SINGLE_ACCOUNTING
,
Font.U_DOUBLE_ACCOUNTING
public boolean isBold()
isBold
in interface
FontFormatting
(接口 FontFormatting 中的 isBold)
public boolean isItalic()
isItalic
in interface
FontFormatting
(接口 FontFormatting 中的 isItalic)
public void setFontStyle(boolean italic, boolean bold)
setFontStyle
in interface
FontFormatting
(接口 FontFormatting 中的 setFontStyle)
italic
- - if true, set posture style to italic, otherwise to normal
(斜体 - 如果为真,设置姿势样式为斜体,否则为正常)
bold
- if true, set font weight to bold, otherwise to normal
(粗体 - 如果为真,将字体粗细设置为粗体,否则设置为正常)
public void resetFontStyle()
resetFontStyle
in interface
FontFormatting
(接口 FontFormatting 中的 resetFontStyle)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.