Class DefaultChartFont
- java.lang.Object
-
- org.pepstock.charba.client.defaults.chart.DefaultChartFont
-
- All Implemented Interfaces:
IsDefaultFont
public final class DefaultChartFont extends Object implements IsDefaultFont
Defaults for font option element, based on chart type.- Author:
- Andrea "Stock" Stocchero
-
-
Constructor Summary
Constructors Constructor Description DefaultChartFont(IsDefaultFont font)Creates the object by font option element instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FontItemcreate()Creates a font options instance using default or cloning current instance.StringgetFamily()Returns the font family, follows CSS font-family options.doublegetLineHeight()Returns the height of an individual line of text.StringgetLineHeightAsString()Returns the height of an individual line of text as string.intgetSize()Returns the font size.FontStylegetStyle()Returns the font style, follows CSS font-style options (i.e.WeightgetWeight()Returns the font weight, follows CSS font-style-weight options.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultFont
create
-
-
-
-
Constructor Detail
-
DefaultChartFont
public DefaultChartFont(IsDefaultFont font)
Creates the object by font option element instance.- Parameters:
font- option element instance.
-
-
Method Detail
-
getSize
public int getSize()
Description copied from interface:IsDefaultFontReturns the font size.- Specified by:
getSizein interfaceIsDefaultFont- Returns:
- the font size.
-
getStyle
public FontStyle getStyle()
Description copied from interface:IsDefaultFontReturns the font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).- Specified by:
getStylein interfaceIsDefaultFont- Returns:
- the font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
-
getFamily
public String getFamily()
Description copied from interface:IsDefaultFontReturns the font family, follows CSS font-family options.- Specified by:
getFamilyin interfaceIsDefaultFont- Returns:
- Font family, follows CSS font-family options.
-
getWeight
public Weight getWeight()
Description copied from interface:IsDefaultFontReturns the font weight, follows CSS font-style-weight options.- Specified by:
getWeightin interfaceIsDefaultFont- Returns:
- the font weight, follows CSS font-style-weight options.
-
getLineHeight
public double getLineHeight()
Description copied from interface:IsDefaultFontReturns the height of an individual line of text.- Specified by:
getLineHeightin interfaceIsDefaultFont- Returns:
- the height of an individual line of text.
-
getLineHeightAsString
public String getLineHeightAsString()
Description copied from interface:IsDefaultFontReturns the height of an individual line of text as string.- Specified by:
getLineHeightAsStringin interfaceIsDefaultFont- Returns:
- the height of an individual line of text as string.
-
create
public FontItem create()
Description copied from interface:IsDefaultFontCreates a font options instance using default or cloning current instance.- Specified by:
createin interfaceIsDefaultFont- Returns:
- a font options instance using default or cloning current instance
-
-