public abstract class AbstractImmutableFont extends NativeObjectContainer implements IsImmutableFont
Helpers.toFont(org.pepstock.charba.client.items.FontItem)
, providing also the CSS string of
font itself.Modifier | Constructor and Description |
---|---|
protected |
AbstractImmutableFont(NativeObject nativeObject)
Creates a immutable font to use, wrapping a native object instance, and providing a CSS string.
|
Modifier and Type | Method and Description |
---|---|
FontItem |
create()
Creates a font options instance using default or cloning current instance.
|
String |
getFamily()
Returns the font family, follows CSS font-family options.
|
double |
getLineHeight()
Returns the height of an individual line of text.
|
String |
getLineHeightAsString()
Returns the height of an individual line of text as string.
|
protected NativeObject |
getObject()
Returns the native object instance.
|
int |
getSize()
Returns the font size.
|
FontStyle |
getStyle()
Returns the font style, follows CSS font-style options (i.e.
|
Weight |
getWeight()
Returns the font weight, follows CSS font-style-weight options.
|
String |
toCSSString()
Builds the font string (shorthand property of CSS font) to use in the canvas object.
See here CSS specification. |
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, 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, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, setValueOrArray, toJSON, type
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
create, create, getFamily, getLineHeight, getSize, getStyle, getWeight
protected AbstractImmutableFont(NativeObject nativeObject)
nativeObject
- native object to map java script propertiespublic final String getLineHeightAsString()
IsDefaultFont
getLineHeightAsString
in interface IsDefaultFont
public final String toCSSString()
IsImmutableFont
toCSSString
in interface IsImmutableFont
public int getSize()
IsDefaultFont
getSize
in interface IsDefaultFont
public FontStyle getStyle()
IsDefaultFont
getStyle
in interface IsDefaultFont
public String getFamily()
IsDefaultFont
getFamily
in interface IsDefaultFont
public Weight getWeight()
IsDefaultFont
getWeight
in interface IsDefaultFont
public double getLineHeight()
IsDefaultFont
getLineHeight
in interface IsDefaultFont
public FontItem create()
IsDefaultFont
create
in interface IsDefaultFont
protected final NativeObject getObject()