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 Summary
Constructors Modifier Constructor Description protected
AbstractImmutableFont(NativeObject nativeObject)
Creates a immutable font to use, wrapping a native object instance, and providing a CSS string.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getLineHeightAsString()
Returns the height of an individual line of text as string.String
toCSSString()
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.AbstractReadOnlyFont
create, getFamily, getLineHeight, getObject, getSize, getStyle, getWeight
-
Methods inherited from class org.pepstock.charba.client.commons.NativeObjectContainer
checkAndGetColor, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.pepstock.charba.client.defaults.IsDefaultFont
create, create, getFamily, getLineHeight, getSize, getStyle, getWeight
-
-
-
-
Constructor Detail
-
AbstractImmutableFont
protected 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
-
getLineHeightAsString
public final String getLineHeightAsString()
Description copied from interface:IsDefaultFont
Returns the height of an individual line of text as string.- Specified by:
getLineHeightAsString
in interfaceIsDefaultFont
- Overrides:
getLineHeightAsString
in classAbstractReadOnlyFont
- Returns:
- the height of an individual line of text as string.
-
toCSSString
public final String toCSSString()
Description copied from interface:IsImmutableFont
Builds the font string (shorthand property of CSS font) to use in the canvas object.
See here CSS specification.- Specified by:
toCSSString
in interfaceIsImmutableFont
- Returns:
- the font string to use in the canvas object.
-
-