Namespace EasyXLS.Drawings.Formatting
Class FontFormat
System.Object
EasyXLS.Drawings.Formatting.FontFormat
public class FontFormat
extends System.Object
This class stores the font options for shapes and other drawing objects. It allows to set the font name, font size, bold-italic options, foreground,
underline, strikethrough, superscript, subscript, caps and character spacing.
-
Constant Summary
Modifier and TypeFieldDescriptionconst System.String
A constant indicating a condensed character spacing.const System.String
A constant indicating an extended character spacing.const System.String
A constant indicating a normal character spacing.const System.String
A constant indicating the dash heavy line style for underline.const System.String
A constant indicating the dash line style for underline.const System.String
A constant indicating the dash long heavy line style for underline.const System.String
A constant indicating the dash long line style for underline.const System.String
A constant indicating the dot dash heavy line style for underline.const System.String
A constant indicating the dot dash line style for underline.const System.String
A constant indicating the dot dot dash heavy line style for underline.const System.String
A constant indicating the dot dot dash line style for underline.const System.String
A constant indicating the dotted heavy line style for underline.const System.String
A constant indicating the dotted line style for underline.const System.String
A constant indicating the double line style for underline.const System.String
A constant indicating the heavy line style for underline.const System.String
A constant indicating that no underline is set.const System.String
A constant indicating the single line style for underline.const System.String
A constant indicating the wavy double line style for underline.const System.String
A constant indicating the wavy heavy line style for underline.const System.String
A constant indicating the wavy line style for underline. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionClone()
Creates and returns a copy of this object.System.String
getFont()
Returns the font name.float
Returns the size of the font.System.Drawing.Color
Returns the font color.Returns the font color.float
Returns the kerning for fonts in points.int
Returns the offset of the font for superscript and subscript options.float
Returns the space between chars in points.System.String
Returns the spacing of the characters.System.Drawing.Color
Returns the color of the underline.System.String
Returns the underline style of the text.Returns the color of the underline.bool
Returns the all caps setting of the font.bool
Returns true if the caps are automatic, false otherwise.bool
Returns true if the character spacing is automatic, false otherwise.bool
Returns true if the character height is automatic, false otherwise.bool
Returns true if the font is automatic, false otherwise.bool
Returns true if the font size is automatic, false otherwise.bool
Returns true if the font style is automatic, false otherwise.bool
Returns true if automatic foreground is set, false otherwise.bool
Returns true if the kerning for fonts is automatic, false otherwise.bool
Returns true if the strikethrough is automatic, false otherwise.bool
Returns true if the superscript/subscript is automatic, false otherwise.bool
Returns true if the underline is automatic, false otherwise.bool
Returns true if underline color is automatic, false otherwise.bool
Returns true if the font is the body font, false otherwise.bool
IsBold()
Returns true if the font is bold, false otherwise.bool
Returns the double strikethrough setting of the font.bool
Returns the equalize character height setting of the font.bool
Returns true if the font is the headings font, false otherwise.bool
IsItalic()
Returns true if the font is italic, false otherwise.bool
Returns the small caps setting of the font.bool
Returns the strikethrough setting of the font.bool
Returns the subscript setting of the font.bool
Returns the superscript setting of the font.void
setAllCaps(bool isAllCaps)
Sets the all caps setting of the font.void
setAutomaticForeground(bool isAutomatic)
Sets the foreground as automatic.void
Sets the body font.void
setBold(bool isBold)
Sets the bold setting of the font.void
setCharacterSpacing(System.String type, float spacingBy)
Sets the character spacing of the font.void
setDoubleStrikethrough(bool isDoubleStrikethrough)
Sets the double strikethrough setting of the font.void
setEqualizeCharacterHeight(bool isEqualizeCharacterHeight)
Sets the equalize character height setting of the font.void
setFont(System.String fontName)
Sets the font name.void
setFontSettings(System.String fontName, int fontSize, bool isBold, bool isItalic, ThemeColor foreground)
Sets the font settings.
This method is overridden as setFontSettings_2 in COM+ version of EasyXLS.
void
setFontSettings(System.String fontName, int fontSize, bool isBold, bool isItalic, System.Drawing.Color foreground)
Sets the font settings.void
setFontSize(float fontSize)
Sets the size of the font.void
setForeground(ThemeColor themeColor)
Sets the font color.
This method is overridden as setForeground_2 in COM+ version of EasyXLS.
void
setForeground(System.Drawing.Color foreground)
Sets the font color.void
Sets the headings font.void
setItalic(bool isItalic)
Sets the italic setting of the font.void
setKerningForFonts(float points)
Sets the kerning for fonts in points.void
setSmallCaps(bool isSmallCaps)
Sets the small caps setting of the font.void
setStrikethrough(bool isStrikethrough)
Sets the strikethrough setting of the font.void
setSubscript(bool isSubscript)
Sets the subscript setting of the font.void
setSubscript(bool isSubscript, int offset)
Sets the subscript setting of the font.
This method is overridden as setSubscript_2 in COM+ version of EasyXLS.
void
setSuperscript(bool isSuperscript)
Sets the superscript setting of the font.void
setSuperscript(bool isSuperscript, int offset)
Sets the superscript setting of the font.
This method is overridden as setSuperscript_2 in COM+ version of EasyXLS.
void
setUnderlineSettings(System.String underlineStyle, bool isAutomaticColor)
Sets the underline settings of the text.void
setUnderlineSettings(System.String underlineStyle, ThemeColor color)
Sets the underline settings of the text.
This method is overridden as setUnderlineSettings_3 in COM+ version of EasyXLS.
void
setUnderlineSettings(System.String underlineStyle, System.Drawing.Color color)
Sets the underline settings of the text.
This method is overridden as setUnderlineSettings_2 in COM+ version of EasyXLS.
Methods inherited from class System.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Field Details
-
UNDERLINE_NONE
public const final System.String UNDERLINE_NONEA constant indicating that no underline is set. Embedded value is "none".- See Also:
- Constant Values
-
UNDERLINE_SINGLE_LINE
public const final System.String UNDERLINE_SINGLE_LINEA constant indicating the single line style for underline. Embedded value is "sng".- See Also:
- Constant Values
-
UNDERLINE_DOUBLE_LINE
public const final System.String UNDERLINE_DOUBLE_LINEA constant indicating the double line style for underline. Embedded value is "dbl".- See Also:
- Constant Values
-
UNDERLINE_HEAVY_LINE
public const final System.String UNDERLINE_HEAVY_LINEA constant indicating the heavy line style for underline. Embedded value is "heavy".- See Also:
- Constant Values
-
UNDERLINE_DOTTED_LINE
public const final System.String UNDERLINE_DOTTED_LINEA constant indicating the dotted line style for underline. Embedded value is "dotted".- See Also:
- Constant Values
-
UNDERLINE_DOTTED_HEAVY_LINE
public const final System.String UNDERLINE_DOTTED_HEAVY_LINEA constant indicating the dotted heavy line style for underline. Embedded value is "dottedHeavy".- See Also:
- Constant Values
-
UNDERLINE_DASH_LINE
public const final System.String UNDERLINE_DASH_LINEA constant indicating the dash line style for underline. Embedded value is "dash".- See Also:
- Constant Values
-
UNDERLINE_DASH_HEAVY_LINE
public const final System.String UNDERLINE_DASH_HEAVY_LINEA constant indicating the dash heavy line style for underline. Embedded value is "dashHeavy".- See Also:
- Constant Values
-
UNDERLINE_DASH_LONG_LINE
public const final System.String UNDERLINE_DASH_LONG_LINEA constant indicating the dash long line style for underline. Embedded value is "dashLong".- See Also:
- Constant Values
-
UNDERLINE_DASH_LONG_HEAVY_LINE
public const final System.String UNDERLINE_DASH_LONG_HEAVY_LINEA constant indicating the dash long heavy line style for underline. Embedded value is "dashLongHeavy".- See Also:
- Constant Values
-
UNDERLINE_DOT_DASH_LINE
public const final System.String UNDERLINE_DOT_DASH_LINEA constant indicating the dot dash line style for underline. Embedded value is "dotDash".- See Also:
- Constant Values
-
UNDERLINE_DOT_DASH_HEAVY_LINE
public const final System.String UNDERLINE_DOT_DASH_HEAVY_LINEA constant indicating the dot dash heavy line style for underline. Embedded value is "dotDashHeavy".- See Also:
- Constant Values
-
UNDERLINE_DOT_DOT_DASH_LINE
public const final System.String UNDERLINE_DOT_DOT_DASH_LINEA constant indicating the dot dot dash line style for underline. Embedded value is "dotDotDash".- See Also:
- Constant Values
-
UNDERLINE_DOT_DOT_DASH_HEAVY_LINE
public const final System.String UNDERLINE_DOT_DOT_DASH_HEAVY_LINEA constant indicating the dot dot dash heavy line style for underline. Embedded value is "dotDotDashHeavy".- See Also:
- Constant Values
-
UNDERLINE_WAVY_LINE
public const final System.String UNDERLINE_WAVY_LINEA constant indicating the wavy line style for underline. Embedded value is "wavy".- See Also:
- Constant Values
-
UNDERLINE_WAVY_HEAVY_LINE
public const final System.String UNDERLINE_WAVY_HEAVY_LINEA constant indicating the wavy heavy line style for underline. Embedded value is "wavyHeavy".- See Also:
- Constant Values
-
UNDERLINE_WAVY_DOUBLE_LINE
public const final System.String UNDERLINE_WAVY_DOUBLE_LINEA constant indicating the wavy double line style for underline. Embedded value is "wavyDbl".- See Also:
- Constant Values
-
SPACING_TYPE_NORMAL
public const final System.String SPACING_TYPE_NORMALA constant indicating a normal character spacing. Embedded value is "normal".- See Also:
- Constant Values
-
SPACING_TYPE_EXPANDED
public const final System.String SPACING_TYPE_EXPANDEDA constant indicating an extended character spacing. Embedded value is "expanded".- See Also:
- Constant Values
-
SPACING_TYPE_CONDENSED
public const final System.String SPACING_TYPE_CONDENSEDA constant indicating a condensed character spacing. Embedded value is "condensed".- See Also:
- Constant Values
-
-
Constructor Details
-
FontFormat
public FontFormat()Defines an instance of the font formatting.
-
-
Method Details
-
getFont
public System.String getFont()Returns the font name.- Returns:
- the name of the font
- See Also:
setFont(System.String)
-
setFont
public void setFont(System.String fontName)Sets the font name.- Parameters:
fontName
- the name of the font- See Also:
getFont()
-
IsHeadingsFont
public bool IsHeadingsFont()Returns true if the font is the headings font, false otherwise.- Returns:
- true if the font is the headings font, false otherwise
- See Also:
setHeadingsFont()
,setFont(System.String)
-
setHeadingsFont
public void setHeadingsFont()Sets the headings font.- See Also:
IsHeadingsFont()
,setFont(System.String)
-
IsBodyFont
public bool IsBodyFont()Returns true if the font is the body font, false otherwise.- Returns:
- true if the font is the body font, false otherwise
- See Also:
setBodyFont()
,setFont(System.String)
-
setBodyFont
public void setBodyFont()Sets the body font.- See Also:
IsBodyFont()
,setFont(System.String)
-
IsAutomaticFont
public bool IsAutomaticFont()Returns true if the font is automatic, false otherwise.- Returns:
- true if the font is automatic, false otherwise
- See Also:
setFont(System.String)
-
IsBold
public bool IsBold()Returns true if the font is bold, false otherwise.- Returns:
- true if the font is bold, false otherwise
- See Also:
setBold(bool)
-
setBold
public void setBold(bool isBold)Sets the bold setting of the font.- Parameters:
isBold
- true if the font is bold, false otherwise- See Also:
IsBold()
-
IsItalic
public bool IsItalic()Returns true if the font is italic, false otherwise.- Returns:
- true if the font is italic, false otherwise
- See Also:
setItalic(bool)
-
setItalic
public void setItalic(bool isItalic)Sets the italic setting of the font.- Parameters:
isItalic
- true if the font is italic, false otherwise- See Also:
IsItalic()
-
IsAutomaticFontStyle
public bool IsAutomaticFontStyle()Returns true if the font style is automatic, false otherwise.- Returns:
- true if the font style is automatic, false otherwise
- See Also:
setBold(bool)
,setItalic(bool)
-
getFontSize
public float getFontSize()Returns the size of the font.- Returns:
- the size of the font
- See Also:
setFontSize(float)
-
setFontSize
public void setFontSize(float fontSize)Sets the size of the font.- Parameters:
fontSize
- the size of the font- See Also:
getFontSize()
-
IsAutomaticFontSize
public bool IsAutomaticFontSize()Returns true if the font size is automatic, false otherwise.- Returns:
- true if the font size is automatic, false otherwise
- See Also:
setFontSize(float)
-
setFontSettings
public void setFontSettings(System.String fontName, int fontSize, bool isBold, bool isItalic, System.Drawing.Color foreground)Sets the font settings.- Parameters:
fontName
- the name of the fontfontSize
- the size of the fontisBold
- the bold option of the fontisItalic
- the italic option of the fontforeground
- the foreground color
-
setFontSettings
public void setFontSettings(System.String fontName, int fontSize, bool isBold, bool isItalic, ThemeColor foreground)Sets the font settings.
This method is overridden as setFontSettings_2 in COM+ version of EasyXLS.
- Parameters:
fontName
- the name of the fontfontSize
- the size of the fontisBold
- the bold option of the fontisItalic
- the italic option of the fontforeground
- the foreground color
-
getForeground
public System.Drawing.Color getForeground()Returns the font color.- Returns:
- the font color
- See Also:
setForeground(Color)
-
setForeground
public void setForeground(System.Drawing.Color foreground)Sets the font color.- Parameters:
foreground
- the new color of font- See Also:
getForeground()
-
getForegroundThemeColor
Returns the font color.- Returns:
- the font color
- See Also:
setForeground(ThemeColor)
-
setForeground
Sets the font color.
This method is overridden as setForeground_2 in COM+ version of EasyXLS.
- Parameters:
themeColor
- the foreground color of font- See Also:
getForegroundThemeColor()
-
IsAutomaticForeground
public bool IsAutomaticForeground()Returns true if automatic foreground is set, false otherwise.- Returns:
- true if automatic foreground is set, false otherwise
- See Also:
setAutomaticForeground(bool)
,setForeground(Color)
,setForeground(ThemeColor)
-
setAutomaticForeground
public void setAutomaticForeground(bool isAutomatic)Sets the foreground as automatic.- Parameters:
isAutomatic
- whether automatic option is set- See Also:
IsAutomaticForeground()
,setForeground(Color)
,setForeground(ThemeColor)
-
getUnderlineStyle
public System.String getUnderlineStyle()Returns the underline style of the text. Possible values are available inFontFormat
class.- Returns:
- the underline style
- See Also:
setUnderlineSettings(String,Color)
,setUnderlineSettings(String,ThemeColor)
-
getUnderlineColor
public System.Drawing.Color getUnderlineColor()Returns the color of the underline.- Returns:
- the color of the underline
- See Also:
setUnderlineSettings(String,Color)
,getUnderlineStyle()
-
getUnderlineThemeColor
Returns the color of the underline.- Returns:
- the color of the underline
- See Also:
setUnderlineSettings(String,ThemeColor)
,getUnderlineStyle()
-
IsAutomaticUnderlineColor
public bool IsAutomaticUnderlineColor()Returns true if underline color is automatic, false otherwise.- Returns:
- true if underline color is automatic, false otherwise.
- See Also:
setUnderlineSettings(String,bool)
,setUnderlineSettings(String,Color)
,setUnderlineSettings(String,ThemeColor)
-
setUnderlineSettings
public void setUnderlineSettings(System.String underlineStyle, bool isAutomaticColor)Sets the underline settings of the text.- Parameters:
underlineStyle
- the underline style of the text. Possible values are available inFontFormat
class.isAutomaticColor
- true if underline color is automatic, false otherwise- See Also:
getUnderlineStyle()
,IsAutomaticUnderlineColor()
-
setUnderlineSettings
public void setUnderlineSettings(System.String underlineStyle, System.Drawing.Color color)Sets the underline settings of the text.
This method is overridden as setUnderlineSettings_2 in COM+ version of EasyXLS.
- Parameters:
underlineStyle
- the underline style of the text. Possible values are available inFontFormat
class.color
- the color of the underline- See Also:
getUnderlineStyle()
,getUnderlineColor()
-
setUnderlineSettings
Sets the underline settings of the text.
This method is overridden as setUnderlineSettings_3 in COM+ version of EasyXLS.
- Parameters:
underlineStyle
- the underline style of the text. Possible values are available inFontFormat
class.color
- the color of the underline- See Also:
getUnderlineStyle()
,getUnderlineThemeColor()
-
IsAutomaticUnderline
public bool IsAutomaticUnderline()Returns true if the underline is automatic, false otherwise.- Returns:
- true if the underline is automatic, false otherwise
- See Also:
setUnderlineSettings(String,bool)
,setUnderlineSettings(String,Color)
,setUnderlineSettings(String,ThemeColor)
-
IsStrikethrough
public bool IsStrikethrough()Returns the strikethrough setting of the font.- Returns:
- the strikethrough setting of the font
- See Also:
setStrikethrough(bool)
,IsDoubleStrikethrough()
-
setStrikethrough
public void setStrikethrough(bool isStrikethrough)Sets the strikethrough setting of the font.- Parameters:
isStrikethrough
- the strikethrough setting of the font- See Also:
IsStrikethrough()
,setDoubleStrikethrough(bool)
-
IsAutomaticStrikethrough
public bool IsAutomaticStrikethrough()Returns true if the strikethrough is automatic, false otherwise.- Returns:
- true if the strikethrough is automatic, false otherwise
- See Also:
setStrikethrough(bool)
,setDoubleStrikethrough(bool)
-
IsDoubleStrikethrough
public bool IsDoubleStrikethrough()Returns the double strikethrough setting of the font.- Returns:
- the double strikethrough setting of the font
- See Also:
setDoubleStrikethrough(bool)
,IsStrikethrough()
-
setDoubleStrikethrough
public void setDoubleStrikethrough(bool isDoubleStrikethrough)Sets the double strikethrough setting of the font.- Parameters:
isDoubleStrikethrough
- the double strikethrough setting of the font- See Also:
IsDoubleStrikethrough()
,setStrikethrough(bool)
-
IsSuperscript
public bool IsSuperscript()Returns the superscript setting of the font.- Returns:
- the superscript setting of the font
- See Also:
setSuperscript(bool)
,setSuperscript(bool,int)
,IsSubscript()
-
setSuperscript
public void setSuperscript(bool isSuperscript)Sets the superscript setting of the font.- Parameters:
isSuperscript
- the superscript setting of the font- See Also:
IsSuperscript()
,setSuperscript(bool,int)
,setSubscript(bool)
,setSubscript(bool,int)
-
setSuperscript
public void setSuperscript(bool isSuperscript, int offset)Sets the superscript setting of the font.
This method is overridden as setSuperscript_2 in COM+ version of EasyXLS.
- Parameters:
isSuperscript
- the superscript setting of the fontoffset
- the offset of the superscript- See Also:
IsSuperscript()
,setSuperscript(bool)
,setSubscript(bool)
,setSubscript(bool,int)
-
IsSubscript
public bool IsSubscript()Returns the subscript setting of the font.- Returns:
- the subscript setting of the font
- See Also:
setSubscript(bool)
,setSubscript(bool,int)
,IsSuperscript()
-
setSubscript
public void setSubscript(bool isSubscript)Sets the subscript setting of the font.- Parameters:
isSubscript
- the new value of the subscript setting- See Also:
IsSubscript()
,setSubscript(bool,int)
,setSuperscript(bool)
,setSuperscript(bool,int)
-
setSubscript
public void setSubscript(bool isSubscript, int offset)Sets the subscript setting of the font.
This method is overridden as setSubscript_2 in COM+ version of EasyXLS.
- Parameters:
isSubscript
- the new value of the subscript settingoffset
- the offset of the subscript- See Also:
IsSubscript()
,setSubscript(bool)
,setSuperscript(bool)
,setSuperscript(bool,int)
-
getOffset
public int getOffset()Returns the offset of the font for superscript and subscript options.- Returns:
- the offset of the font for superscript and subscript options
- See Also:
setSuperscript(bool,int)
,setSubscript(bool,int)
-
IsAutomaticSuperscriptSubscript
public bool IsAutomaticSuperscriptSubscript()Returns true if the superscript/subscript is automatic, false otherwise.- Returns:
- true if the superscript/subscript is automatic, false otherwise
- See Also:
setSuperscript(bool)
,setSuperscript(bool,int)
,setSubscript(bool)
,setSubscript(bool,int)
-
IsSmallCaps
public bool IsSmallCaps()Returns the small caps setting of the font.- Returns:
- the small caps setting of the font
- See Also:
setSmallCaps(bool)
-
setSmallCaps
public void setSmallCaps(bool isSmallCaps)Sets the small caps setting of the font.- Parameters:
isSmallCaps
- the new value of the small caps setting- See Also:
IsSmallCaps()
-
IsAllCaps
public bool IsAllCaps()Returns the all caps setting of the font.- Returns:
- the all caps setting of the font
- See Also:
setAllCaps(bool)
-
setAllCaps
public void setAllCaps(bool isAllCaps)Sets the all caps setting of the font.- Parameters:
isAllCaps
- the new value of the all caps setting- See Also:
IsAllCaps()
-
IsAutomaticCaps
public bool IsAutomaticCaps()Returns true if the caps are automatic, false otherwise.- Returns:
- true if the caps are automatic, false otherwise
- See Also:
setSmallCaps(bool)
,setAllCaps(bool)
-
IsEqualizeCharacterHeight
public bool IsEqualizeCharacterHeight()Returns the equalize character height setting of the font.- Returns:
- the equalize character height setting of the font
- See Also:
setEqualizeCharacterHeight(bool)
-
setEqualizeCharacterHeight
public void setEqualizeCharacterHeight(bool isEqualizeCharacterHeight)Sets the equalize character height setting of the font.- Parameters:
isEqualizeCharacterHeight
- the equalize character height setting of the font- See Also:
IsEqualizeCharacterHeight()
-
IsAutomaticEqualizeCharacterHeight
public bool IsAutomaticEqualizeCharacterHeight()Returns true if the character height is automatic, false otherwise.- Returns:
- true if the character height is automatic, false otherwise
- See Also:
setEqualizeCharacterHeight(bool)
-
getSpacingType
public System.String getSpacingType()Returns the spacing of the characters. Possible values are available inFontFormat
class.- Returns:
- the spacing of the characters
- See Also:
setCharacterSpacing(System.String, float)
,setKerningForFonts(float)
-
setCharacterSpacing
public void setCharacterSpacing(System.String type, float spacingBy)Sets the character spacing of the font.- Parameters:
type
- character spacing of the font. Possible values are available inFontFormat
classspacingBy
- the space between chars in points. For FontFormat.SPACING_TYPE_NORMAL the value is ignored.- See Also:
getSpacingType()
,getSpacingBy()
,setKerningForFonts(float)
-
getSpacingBy
public float getSpacingBy()Returns the space between chars in points.- Returns:
- the space between chars in points
- See Also:
setCharacterSpacing(System.String, float)
,setKerningForFonts(float)
-
IsAutomaticCharacterSpacing
public bool IsAutomaticCharacterSpacing()Returns true if the character spacing is automatic, false otherwise.- Returns:
- true if the character spacing is automatic, false otherwise
- See Also:
setCharacterSpacing(System.String, float)
-
getKerningForFonts
public float getKerningForFonts()Returns the kerning for fonts in points.- Returns:
- the kerning for fonts in points
- See Also:
setKerningForFonts(float)
,setCharacterSpacing(System.String, float)
-
setKerningForFonts
public void setKerningForFonts(float points)Sets the kerning for fonts in points.- Parameters:
points
- the kerning for fonts in points. A value of 0 means no kerning.- See Also:
getKerningForFonts()
,setCharacterSpacing(System.String, float)
-
IsAutomaticKerningForFonts
public bool IsAutomaticKerningForFonts()Returns true if the kerning for fonts is automatic, false otherwise.- Returns:
- true if the kerning for fonts is automatic, false otherwise
- See Also:
setKerningForFonts(float)
-
Clone
Creates and returns a copy of this object.- Returns:
- a clone of this instance.
-