public final class HSSFFontFormatting extends java.lang.Object implements FontFormatting
Modifier and Type | Method and Description |
---|---|
short |
getEscapementType()
get the type of super or subscript for the font
(获取字体的上标或下标类型)
|
HSSFColor |
getFontColor() |
short |
getFontColorIndex() |
int |
getFontHeight()
gets the height of the font in 1/20th point units
(以 1/20 点为单位获取字体高度)
|
short |
getFontWeight()
get the font weight for this font (100-1000dec or 0x64-0x3e8).
(获取此字体的字体粗细(100-1000dec 或 0x64-0x3e8)。)
|
short |
getUnderlineType()
get the type of underlining for the font
(获取字体下划线的类型)
|
boolean |
isBold()
get whether the font weight is set to bold or not
(获取字体粗细是否设置为粗体)
|
boolean |
isEscapementTypeModified() |
boolean |
isFontCancellationModified() |
boolean |
isFontOutlineModified() |
boolean |
isFontShadowModified() |
boolean |
isFontStyleModified() |
boolean |
isFontWeightModified() |
boolean |
isItalic() |
boolean |
isOutlineOn() |
boolean |
isShadowOn() |
boolean |
isStruckout() |
boolean |
isUnderlineTypeModified() |
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 |
setEscapementTypeModified(boolean modified) |
void |
setFontCancellationModified(boolean modified) |
void |
setFontColor(Color color)
Sets the colour to use
(设置要使用的颜色)
|
void |
setFontColorIndex(short fci)
Sets the indexed colour to use
(设置要使用的索引颜色)
|
void |
setFontHeight(int height)
Sets the height of the font in 1/20th point units
(以 1/20 磅为单位设置字体高度)
|
void |
setFontOutlineModified(boolean modified) |
void |
setFontShadowModified(boolean modified) |
void |
setFontStyle(boolean italic, boolean bold)
set font style options.
(设置字体样式选项。)
|
void |
setFontStyleModified(boolean modified) |
void |
setOutline(boolean on) |
void |
setShadow(boolean on) |
void |
setStrikeout(boolean strike) |
void |
setUnderlineType(short underlineType)
set the type of underlining type for the font
(设置字体的下划线类型)
|
void |
setUnderlineTypeModified(boolean modified) |
public short getEscapementType()
getEscapementType
in interface
FontFormatting
(接口 FontFormatting 中的 getEscapementType)
Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public short getFontColorIndex()
getFontColorIndex
in interface
FontFormatting
(接口 FontFormatting 中的 getFontColorIndex)
public HSSFColor 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 short getFontWeight()
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 boolean isBold()
isBold
in interface
FontFormatting
(接口 FontFormatting 中的 isBold)
public boolean isEscapementTypeModified()
public boolean isFontCancellationModified()
public boolean isFontOutlineModified()
public boolean isFontShadowModified()
public boolean isFontStyleModified()
public boolean isItalic()
isItalic
in interface
FontFormatting
(接口 FontFormatting 中的 isItalic)
public boolean isOutlineOn()
public boolean isShadowOn()
public boolean isStruckout()
isStruckout
in interface
FontFormatting
(接口 FontFormatting 中的 isStruckout)
public boolean isUnderlineTypeModified()
public boolean isFontWeightModified()
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)
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 void setEscapementTypeModified(boolean modified)
modified
- flag, if escapement type is modified
(modified - 标志,如果擒纵类型被修改)
FontFormatting.setEscapementTypeModified(boolean)
public void setFontCancellationModified(boolean modified)
modified
- flag, if font cancellation is modified
(modified - 标志,如果字体取消被修改)
FontFormatting.setFontCancellationModified(boolean)
public void setFontColorIndex(short fci)
FontFormatting
setFontColorIndex
in interface
FontFormatting
(接口 FontFormatting 中的 setFontColorIndex)
fci
- the font color index
(fci - 字体颜色索引)
FontFormatting.setFontColorIndex(short)
public void setFontHeight(int height)
FontFormatting
setFontHeight
in interface
FontFormatting
(接口 FontFormatting 中的 setFontHeight)
height
- the font height
(height - 字体高度)
FontFormatting.setFontHeight(int)
public void setFontOutlineModified(boolean modified)
modified
- flag, if font outline is modified
(modified - 标志,如果字体轮廓被修改)
FontFormatting.setFontOutlineModified(boolean)
public void setFontShadowModified(boolean modified)
modified
- flag, if font shadow is modified
(modified - 标志,如果字体阴影被修改)
FontFormatting.setFontShadowModified(boolean)
public void setFontStyleModified(boolean modified)
modified
- flag, if font style is modified
(modified - 标志,如果字体样式被修改)
FontFormatting.setFontStyleModified(boolean)
public void setOutline(boolean on)
on
- flag, if outline is set
(on - 标志,如果设置了大纲)
FontFormatting.setOutline(boolean)
public void setShadow(boolean on)
on
- flag, if shadow is set
(on - 标志,如果设置了阴影)
FontFormatting.setShadow(boolean)
public void setStrikeout(boolean strike)
strike
- flag, if strikeout is set
(罢工 - 标志,如果设置了罢工)
FontFormatting.setStrikeout(boolean)
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 void setUnderlineTypeModified(boolean modified)
modified
- flag, if underline type is modified
(modified - 标志,如果下划线类型被修改)
FontFormatting.setUnderlineTypeModified(boolean)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.