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
|
short |
getFontWeight()
get the font weight for this font (100-1000dec or 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
|
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 FontFormattingFont.SS_NONE,
Font.SS_SUPER,
Font.SS_SUBpublic short getFontColorIndex()
getFontColorIndex in interface FontFormattingpublic HSSFColor getFontColor()
getFontColor in interface FontFormattingpublic void setFontColor(Color color)
FontFormattingsetFontColor in interface FontFormattingcolor - font colour to usepublic int getFontHeight()
getFontHeight in interface FontFormattingpublic short getFontWeight()
public short getUnderlineType()
getUnderlineType in interface FontFormattingFont.U_NONE,
Font.U_SINGLE,
Font.U_DOUBLE,
Font.U_SINGLE_ACCOUNTING,
Font.U_DOUBLE_ACCOUNTINGpublic boolean isBold()
isBold in interface FontFormattingpublic boolean isEscapementTypeModified()
public boolean isFontCancellationModified()
public boolean isFontOutlineModified()
public boolean isFontShadowModified()
public boolean isFontStyleModified()
public boolean isItalic()
isItalic in interface FontFormattingpublic boolean isOutlineOn()
public boolean isShadowOn()
public boolean isStruckout()
isStruckout in interface FontFormattingpublic boolean isUnderlineTypeModified()
public boolean isFontWeightModified()
public void setFontStyle(boolean italic,
boolean bold)
setFontStyle in interface FontFormattingitalic - - 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 FontFormattingpublic void setEscapementType(short escapementType)
setEscapementType in interface FontFormattingescapementType - super or subscript optionFont.SS_NONE,
Font.SS_SUPER,
Font.SS_SUBpublic void setEscapementTypeModified(boolean modified)
modified - flag, if escapement type is modifiedFontFormatting.setEscapementTypeModified(boolean)public void setFontCancellationModified(boolean modified)
modified - flag, if font cancellation is modifiedFontFormatting.setFontCancellationModified(boolean)public void setFontColorIndex(short fci)
FontFormattingsetFontColorIndex in interface FontFormattingfci - the font color indexFontFormatting.setFontColorIndex(short)public void setFontHeight(int height)
FontFormattingsetFontHeight in interface FontFormattingheight - the font heightFontFormatting.setFontHeight(int)public void setFontOutlineModified(boolean modified)
modified - flag, if font outline is modifiedFontFormatting.setFontOutlineModified(boolean)public void setFontShadowModified(boolean modified)
modified - flag, if font shadow is modifiedFontFormatting.setFontShadowModified(boolean)public void setFontStyleModified(boolean modified)
modified - flag, if font style is modifiedFontFormatting.setFontStyleModified(boolean)public void setOutline(boolean on)
on - flag, if outline is setFontFormatting.setOutline(boolean)public void setShadow(boolean on)
on - flag, if shadow is setFontFormatting.setShadow(boolean)public void setStrikeout(boolean strike)
strike - flag, if strikeout is setFontFormatting.setStrikeout(boolean)public void setUnderlineType(short underlineType)
setUnderlineType in interface FontFormattingunderlineType - super or subscript optionFont.U_NONE,
Font.U_SINGLE,
Font.U_DOUBLE,
Font.U_SINGLE_ACCOUNTING,
Font.U_DOUBLE_ACCOUNTINGpublic void setUnderlineTypeModified(boolean modified)
modified - flag, if underline type is modifiedFontFormatting.setUnderlineTypeModified(boolean)Copyright 2022 The Apache Software Foundation or its licensors, as applicable.