public final class FontFormatting extends java.lang.Object implements Duplicatable, GenericRecord
Modifier and Type | Field and Description |
---|---|
static int |
FONT_CELL_HEIGHT_PRESERVED |
Constructor and Description |
---|
FontFormatting() |
FontFormatting(FontFormatting other) |
FontFormatting(RecordInputStream in) |
Modifier and Type | Method and Description |
---|---|
FontFormatting |
copy() |
int |
getDataLength() |
short |
getEscapementType()
get the type of super or subscript for the font
(获取字体的上标或下标类型)
|
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)。)
|
java.util.Map<java.lang.String,java.util.function.Supplier<?>> |
getGenericProperties() |
byte[] |
getRawRecord() |
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()
get whether the font is to be italics or not
(获取字体是否为斜体)
|
boolean |
isOutlineOn() |
boolean |
isShadowOn() |
boolean |
isStruckout()
get whether the font is to be stricken out or not
(获取字体是否被删除)
|
boolean |
isUnderlineTypeModified() |
void |
setBold(boolean bold)
set the font weight to bold (weight=700) or to normal(weight=400) boldness.
(将字体粗细设置为粗体(粗细=700)或正常(粗细=400)粗体。)
|
void |
setEscapementType(short escapementType)
set the escapement type for the font
(设置字体的擒纵类型)
|
void |
setEscapementTypeModified(boolean modified) |
void |
setFontCancellationModified(boolean modified) |
void |
setFontColorIndex(short fci) |
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 |
setFontStyleModified(boolean modified) |
void |
setFontWieghtModified(boolean modified) |
void |
setItalic(boolean italic)
set the font to be italics or not
(设置字体是否为斜体)
|
void |
setOutline(boolean on) |
void |
setShadow(boolean on) |
void |
setStrikeout(boolean strike)
set the font to be stricken out or not
(设置字体是否被删除)
|
void |
setUnderlineType(short underlineType)
set the type of underlining type for the font
(设置字体的下划线类型)
|
void |
setUnderlineTypeModified(boolean modified) |
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getGenericChildren, getGenericRecordType
public static final int FONT_CELL_HEIGHT_PRESERVED
public FontFormatting()
public FontFormatting(FontFormatting other)
public FontFormatting(RecordInputStream in)
public byte[] getRawRecord()
public int getDataLength()
public void setFontHeight(int height)
height
- fontheight (in points/20); or -1 to preserve the cell font height
(高度 - 字体高度(以磅/20 为单位);或 -1 保留单元格字体高度)
public int getFontHeight()
public void setItalic(boolean italic)
italic
- - whether the font is italics or not
(italic - - 字体是否为斜体)
setFontOption(boolean, org.apache.poi.util.BitField)
public boolean isItalic()
getFontOption(org.apache.poi.util.BitField)
public void setOutline(boolean on)
public boolean isOutlineOn()
public void setShadow(boolean on)
public boolean isShadowOn()
public void setStrikeout(boolean strike)
strike
- - whether the font is stricken out or not
(打击 - - 字体是否被删除)
public boolean isStruckout()
getFontOption(org.apache.poi.util.BitField)
public void setBold(boolean bold)
bold
- - set font weight to bold if true; to normal otherwise
(粗体 - 如果为真,则将字体粗细设置为粗体;否则正常)
public short getFontWeight()
public boolean isBold()
public short getEscapementType()
Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public void setEscapementType(short escapementType)
escapementType
- super or subscript option
(escapementType - 上标或下标选项)
Font.SS_NONE
,
Font.SS_SUPER
,
Font.SS_SUB
public short getUnderlineType()
Font.U_NONE
,
Font.U_SINGLE
,
Font.U_DOUBLE
,
Font.U_SINGLE_ACCOUNTING
,
Font.U_DOUBLE_ACCOUNTING
public void setUnderlineType(short underlineType)
underlineType
- underline option
(underlineType - 下划线选项)
Font.U_NONE
,
Font.U_SINGLE
,
Font.U_DOUBLE
,
Font.U_SINGLE_ACCOUNTING
,
Font.U_DOUBLE_ACCOUNTING
public short getFontColorIndex()
public void setFontColorIndex(short fci)
public boolean isFontStyleModified()
public void setFontStyleModified(boolean modified)
public boolean isFontOutlineModified()
public void setFontOutlineModified(boolean modified)
public boolean isFontShadowModified()
public void setFontShadowModified(boolean modified)
public void setFontCancellationModified(boolean modified)
public boolean isFontCancellationModified()
public void setEscapementTypeModified(boolean modified)
public boolean isEscapementTypeModified()
public void setUnderlineTypeModified(boolean modified)
public boolean isUnderlineTypeModified()
public void setFontWieghtModified(boolean modified)
public boolean isFontWeightModified()
public java.util.Map<java.lang.String,java.util.function.Supplier<?>> getGenericProperties()
getGenericProperties
in interface
GenericRecord
(接口 GenericRecord 中的 getGenericProperties)
public java.lang.String toString()
toString
in class
java.lang.Object
public FontFormatting copy()
copy
in interface
Duplicatable
(复制到界面 Duplicatable)
Copyright 2021 The Apache Software Foundation or its licensors, as applicable.