public final class Font extends AbstractNode implements IsFont
Modifier and Type | Method and Description |
---|---|
FontItem |
create()
Creates a font options instance using default or cloning current instance.
|
FontItem |
create(IsDefaultFont defaultValues)
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.
|
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.
|
void |
setFamily(String family)
Sets the font family, follows CSS font-family options.
|
void |
setLineHeight(double lineHeight)
Sets the line height.
|
void |
setLineHeight(String lineHeight)
Sets the line height.
|
void |
setSize(int size)
Sets the font size.
|
void |
setStyle(FontStyle style)
Sets the font style, follows CSS font-style options (i.e.
|
void |
setWeight(Weight weight)
Sets the font weight, follows CSS font-style-weight options.
|
checkAndAddToParent, getChildKey, getParentNode, getRootNode, retrieveRoot, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setArrayValueAndAddToParent, setElementAndAddToParent, setInternalCallbackToModel, setInternalCallbackToModel, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent, setValueOrArrayAndAddToParent
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
public void setSize(int size)
public int getSize()
getSize
in interface IsDefaultFont
public void setStyle(FontStyle style)
public FontStyle getStyle()
getStyle
in interface IsDefaultFont
public void setFamily(String family)
public String getFamily()
getFamily
in interface IsDefaultFont
public void setWeight(Weight weight)
public Weight getWeight()
getWeight
in interface IsDefaultFont
public void setLineHeight(double lineHeight)
setLineHeight
in interface IsFont
lineHeight
- the line height.public void setLineHeight(String lineHeight)
setLineHeight
in interface IsFont
lineHeight
- the line height.public double getLineHeight()
getLineHeight
in interface IsDefaultFont
public String getLineHeightAsString()
getLineHeightAsString
in interface IsDefaultFont
public FontItem create()
IsDefaultFont
create
in interface IsDefaultFont
public FontItem create(IsDefaultFont defaultValues)
IsDefaultFont
create
in interface IsDefaultFont
defaultValues
- default provider