Class AbstractFont
- java.lang.Object
- 
- org.pepstock.charba.client.commons.NativeObjectContainer
- 
- org.pepstock.charba.client.options.AbstractReadOnlyFont
- 
- org.pepstock.charba.client.options.AbstractFont
 
 
 
- 
- All Implemented Interfaces:
- IsDefaultFont,- IsFont
 - Direct Known Subclasses:
- AbstractScriptableFont,- FontItem
 
 public abstract class AbstractFont extends AbstractReadOnlyFont implements IsFont Base class to map the font properties of an element.- Author:
- Andrea "Stock" Stocchero
 
- 
- 
Constructor SummaryConstructors Modifier Constructor Description protectedAbstractFont(AbstractNode parent, IsDefaultFont defaultValues, NativeObject nativeObject)Creates a font to use for chart configuration, wrapping a native object instance.protectedAbstractFont(IsDefaultFont defaultValues)Creates an empty font to use for chart configuration.protectedAbstractFont(IsDefaultFont defaultValues, NativeObject nativeObject)Creates a font to use for chart configuration, wrapping a native object instance.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description NodeUpdateListenergetUpdateListener()Returns the update listener instance if there is.voidsetFamily(String family)Sets the font family, follows CSS font-family options.voidsetLineHeight(double lineHeight)Sets the line height.voidsetLineHeight(String lineHeight)Sets the line height.voidsetSize(int size)Sets the font size.voidsetStyle(FontStyle style)Sets the font style, follows CSS font-style options (i.e.voidsetUpdateListener(NodeUpdateListener updateListener)Sets an update listener instance to be invoked at every update.voidsetWeight(Weight weight)Sets the font weight, follows CSS font-style-weight options.- 
Methods inherited from class org.pepstock.charba.client.options.AbstractReadOnlyFontcreate, getFamily, getLineHeight, getLineHeightAsString, 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, 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, getLineHeightAsString, getSize, getStyle, getWeight
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractFontprotected AbstractFont(IsDefaultFont defaultValues) Creates an empty font to use for chart configuration.- Parameters:
- defaultValues- default provider
 
 - 
AbstractFontprotected AbstractFont(IsDefaultFont defaultValues, NativeObject nativeObject) Creates a font to use for chart configuration, wrapping a native object instance.- Parameters:
- defaultValues- default provider
- nativeObject- native object to map java script properties
 
 - 
AbstractFontprotected AbstractFont(AbstractNode parent, IsDefaultFont defaultValues, NativeObject nativeObject) Creates a font to use for chart configuration, wrapping a native object instance.- Parameters:
- parent- the native object container which font belongs to.
- defaultValues- default provider
- nativeObject- native object to map java script properties
 
 
- 
 - 
Method Detail- 
setUpdateListenerpublic final void setUpdateListener(NodeUpdateListener updateListener) Sets an update listener instance to be invoked at every update.- Parameters:
- updateListener- an update listener instance to be invoked at every update
 
 - 
getUpdateListenerpublic final NodeUpdateListener getUpdateListener() Returns the update listener instance if there is.- Returns:
- the update listener
 
 - 
setSizepublic void setSize(int size) Description copied from interface:IsFontSets the font size.
 - 
setStylepublic void setStyle(FontStyle style) Description copied from interface:IsFontSets the font style, follows CSS font-style options (i.e. normal, italic, oblique, initial, inherit).
 - 
setFamilypublic void setFamily(String family) Description copied from interface:IsFontSets the font family, follows CSS font-family options.
 - 
setWeightpublic void setWeight(Weight weight) Description copied from interface:IsFontSets the font weight, follows CSS font-style-weight options.
 - 
setLineHeightpublic void setLineHeight(double lineHeight) Description copied from interface:IsFontSets the line height.- Specified by:
- setLineHeightin interface- IsFont
- Parameters:
- lineHeight- the line height.
 
 - 
setLineHeightpublic void setLineHeight(String lineHeight) Description copied from interface:IsFontSets the line height.- Specified by:
- setLineHeightin interface- IsFont
- Parameters:
- lineHeight- the line height.
 
 
- 
 
-