Class AbstractImmutableFont
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.options.AbstractReadOnlyFont
- 
- org.pepstock.charba.client.options.AbstractImmutableFont
 
 
 
- 
- All Implemented Interfaces:
- IsDefaultFont,- IsImmutableFont
 
 public abstract class AbstractImmutableFont extends AbstractReadOnlyFont implements IsImmutableFont Base class to map a font element in read-only mode, normalized by CHART.JS byHelpers.toFont(org.pepstock.charba.client.items.FontItem), providing also the CSS string of font itself.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractImmutableFont(NativeObject nativeObject)Creates a immutable font to use, wrapping a native object instance, and providing a CSS string.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetLineHeightAsString()Returns the height of an individual line of text as string.StringtoCSSString()Builds the font string (shorthand property of CSS font) to use in the canvas object.
 See here CSS specification.- 
Methods inherited from class org.pepstock.charba.client.options.AbstractReadOnlyFontcreate, getFamily, getLineHeight, getObject, getSize, getStyle, getWeight
 - 
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainercheckAndGetColor, checkDefaultValuesArgument, empty, getArrayValue, getElement, getIncrementalId, getNativeChart, getNativeEvent, getNativeObject, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueForMultipleKeyTypes, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, getValueOrArray, has, has, isType, keys, loadNativeObject, remove, remove, setArrayValue, setArrayValue, setArrayValue, setElement, setEmptyValue, setNewIncrementalId, setNewIncrementalId, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValue, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultFontcreate, create, getFamily, getLineHeight, getSize, getStyle, getWeight
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractImmutableFontprotected AbstractImmutableFont(NativeObject nativeObject) Creates a immutable font to use, wrapping a native object instance, and providing a CSS string.- Parameters:
- nativeObject- native object to map java script properties
 
 
- 
 - 
Method Detail- 
getLineHeightAsStringpublic final String getLineHeightAsString() Description copied from interface:IsDefaultFontReturns the height of an individual line of text as string.- Specified by:
- getLineHeightAsStringin interface- IsDefaultFont
- Overrides:
- getLineHeightAsStringin class- AbstractReadOnlyFont
- Returns:
- the height of an individual line of text as string.
 
 - 
toCSSStringpublic final String toCSSString() Description copied from interface:IsImmutableFontBuilds the font string (shorthand property of CSS font) to use in the canvas object.
 See here CSS specification.- Specified by:
- toCSSStringin interface- IsImmutableFont
- Returns:
- the font string to use in the canvas object.
 
 
- 
 
-