public final class FontFormatting extends java.lang.Object implements Duplicatable
Modifier and Type | Field and Description |
---|---|
static int |
FONT_CELL_HEIGHT_PRESERVED |
static short |
SS_NONE
Escapement type - None
|
static short |
SS_SUB
Escapement type - Subscript
|
static short |
SS_SUPER
Escapement type - Superscript
|
static byte |
U_DOUBLE
Underline type - Double
|
static byte |
U_DOUBLE_ACCOUNTING
Underline type - Double Accounting
|
static byte |
U_NONE
Underline type - None
|
static byte |
U_SINGLE
Underline type - Single
|
static byte |
U_SINGLE_ACCOUNTING
Underline type - Single Accounting
|
Constructor and Description |
---|
FontFormatting() |
FontFormatting(FontFormatting other) |
FontFormatting(RecordInputStream in) |
Modifier and Type | Method and Description |
---|---|
FontFormatting |
clone()
Deprecated.
|
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
|
short |
getFontWeight()
get the font weight for this font (100-1000dec or 0x64-0x3e8).
|
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.
|
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
|
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() |
public static final int FONT_CELL_HEIGHT_PRESERVED
public static final short SS_NONE
public static final short SS_SUPER
public static final short SS_SUB
public static final byte U_NONE
public static final byte U_SINGLE
public static final byte U_DOUBLE
public static final byte U_SINGLE_ACCOUNTING
public static final byte U_DOUBLE_ACCOUNTING
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 heightpublic int getFontHeight()
public void setItalic(boolean italic)
italic
- - whether the font is italics or notsetFontOption(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 notpublic boolean isStruckout()
getFontOption(org.apache.poi.util.BitField)
public void setBold(boolean bold)
bold
- - set font weight to bold if true; to normal otherwisepublic short getFontWeight()
public boolean isBold()
public short getEscapementType()
FontFormatting.SS_NONE
,
FontFormatting.SS_SUPER
,
FontFormatting.SS_SUB
public void setEscapementType(short escapementType)
escapementType
- super or subscript optionFontFormatting.SS_NONE
,
FontFormatting.SS_SUPER
,
FontFormatting.SS_SUB
public short getUnderlineType()
HSSFFontFormatting.U_NONE
,
HSSFFontFormatting.U_SINGLE
,
HSSFFontFormatting.U_DOUBLE
,
HSSFFontFormatting.U_SINGLE_ACCOUNTING
,
HSSFFontFormatting.U_DOUBLE_ACCOUNTING
public void setUnderlineType(short underlineType)
underlineType
- underline optionHSSFFontFormatting.U_NONE
,
HSSFFontFormatting.U_SINGLE
,
HSSFFontFormatting.U_DOUBLE
,
HSSFFontFormatting.U_SINGLE_ACCOUNTING
,
HSSFFontFormatting.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.lang.String toString()
toString
in class java.lang.Object
@Deprecated @Removal(version="5.0.0") public FontFormatting clone()
clone
in class java.lang.Object
public FontFormatting copy()
copy
in interface Duplicatable
Copyright 2020 The Apache Software Foundation or its licensors, as applicable.